Adding FreeSwitch to NanoBSD

FazeLessWhite

New Member


Messages: 4

Hey guys! I wanted to add FreeSwitch from the internet on to my NanoBSD build,
This is how you add it on a freebsdFreeBSD system :

Code:
pkg install autoconf automake curl git gmake jpeg ldns libedit libtool openssl pcre pkgconf speex sqlite3 wget sudo
mkdir ~/src
cd ~/src
git clone https://freeswitch.org/stash/scm/fs/freeswitch.git

cd freeswitch
./bootstrap.sh -j
./configure
gmake
sudo gmake install cd-sounds-install cd-moh-install
How do I add this to my nanobsd.sh file?
Here is my current nanobsd.sh file : http://pastebin.com/USjfJDZE
 

tobik@

Daemon
Developer

Reaction score: 1,399
Messages: 1,909

Here is my current nanobsd.sh file : http://pastebin.com/USjfJDZE
Here is the diff for your version and the one in 10.1-RELEASE:
Code:
diff --git a/tools/tools/nanobsd/nanobsd.sh b/tools/tools/nanobsd/nanobsd.sh
old mode 100644
new mode 100755
index 600d112..7fc4ddf
--- a/tools/tools/nanobsd/nanobsd.sh
+++ b/tools/tools/nanobsd/nanobsd.sh
@@ -93,7 +93,7 @@ NANO_LATE_CUSTOMIZE=""
 NANO_NEWFS="-b 4096 -f 512 -i 8192 -U"
 
 # The drive name of the media at runtime
-NANO_DRIVE=ad0
+NANO_DRIVE=da0
 
 # Target media size in 512 bytes sectors
 NANO_MEDIASIZE=2000000
@@ -416,7 +416,7 @@ setup_nanobsd_etc ( ) (
        touch etc/diskless
 
        # Make root filesystem R/O by default
-       echo "root_rw_mount=NO" >> etc/defaults/rc.conf
+       echo "root_rw_mount=YES" >> etc/defaults/rc.conf
 
        # save config file for scripts
        echo "NANO_DRIVE=${NANO_DRIVE}" > etc/nanobsd.conf
You should not need to edit nanobsd.sh directly. It's specifically designed to allow you to customize it. Read nanobsd(8) if you haven't done so already.

NANO_DRIVE can be overridden in your NanoBSD config file and root_rw_mount can be set in your image's /etc/rc.conf. You can do this with a customization function (nanobsd(8) contains an example of one).

I have a NanoBSD project here https://github.com/t6/wifistreamer which installs some packages in the image. Maybe you can adapt it and add a customization function to run the steps you have outlined for installing FreeSwitch.
 
OP
F

FazeLessWhite

New Member


Messages: 4

Thanks for your reply tobik! I have a lot of question's remaining still, would you please come over to an IRC?
I'll be here at irc.freenode.net under #nanobsd
 
OP
F

FazeLessWhite

New Member


Messages: 4

I'm getting a new error after adding this :

Code:
install_packages () (

chroot ${NANO_WORLDDIR} sh -c 'cd packages; pkg; pkg install nano; pkg clean;'

)
customize_cmd install_packages

# I just wanted to test this by adding nano
File: /usr/obj/nanobsd.full//_.cust.install_packages

Code:
+ install_packages

+ chroot /usr/obj/nanobsd.full//_.w sh -c 'cd packages; pkg; pkg install nano; pkg clean;'

cd: packages: No such file or directory

The package management tool is not yet installed on your system.

Do you want to fetch and install it now? [y/N]: The package management tool is not yet installed on your system.

Do you want to fetch and install it now? [y/N]: The package management tool is not yet installed on your system.

Do you want to fetch and install it now? [y/N]:[CODE]
[/CODE]

I get this error...
 
OP
F

FazeLessWhite

New Member


Messages: 4

I did that and now I'm confused about the directories, In which directory should I do the package installation?

Code:
+ install_packages

+ chroot /usr/obj/nanobsd.full//_.w sh -c 'mkdir pkg;cd pkg; pkg install -y nano; pkg clean -y;'

The package management tool is not yet installed on your system.

Do you want to fetch and install it now? [y/N]: The package management tool is not yet installed on your system.

Do you want to fetch and install it now? [y/N]:
Still the same error !
 
Top