install_prereq: Add DragonFly BSD.
[asterisk/asterisk.git] / contrib / scripts / install_prereq
1 #! /bin/sh
2 #
3 # $Id$
4 #
5
6 # install_prereq: a script to install distribution-specific
7 # prerequirements
8
9 set -e
10
11 usage() {
12         echo "$0: a script to install distribution-specific prerequirement"
13         echo 'Revision: $Id$'
14         echo ""
15         echo "Usage: $0:                    Shows this message."
16         echo "Usage: $0 test                Prints commands it is about to run."
17         echo "Usage: $0 install             Really install."
18         echo "Usage: $0 install-unpackaged  Really install unpackaged requirements."
19 }
20
21 # Basic build system:
22 PACKAGES_DEBIAN="build-essential pkg-config"
23 # Asterisk: basic requirements:
24 PACKAGES_DEBIAN="$PACKAGES_DEBIAN libedit-dev libjansson-dev libsqlite3-dev uuid-dev libxml2-dev"
25 # Asterisk: for addons:
26 PACKAGES_DEBIAN="$PACKAGES_DEBIAN libspeex-dev libspeexdsp-dev libogg-dev libvorbis-dev libasound2-dev portaudio19-dev libcurl4-openssl-dev xmlstarlet bison flex"
27 PACKAGES_DEBIAN="$PACKAGES_DEBIAN libpq-dev unixodbc-dev libneon27-dev libgmime-2.6-dev liblua5.2-dev liburiparser-dev libxslt1-dev libssl-dev"
28 PACKAGES_DEBIAN="$PACKAGES_DEBIAN libvpb-dev libmysqlclient-dev libbluetooth-dev libradcli-dev freetds-dev libosptk-dev libjack-jackd2-dev bash"
29 PACKAGES_DEBIAN="$PACKAGES_DEBIAN libsnmp-dev libiksemel-dev libcorosync-common-dev libcpg-dev libcfg-dev libnewt-dev libpopt-dev libical-dev libspandsp-dev"
30 PACKAGES_DEBIAN="$PACKAGES_DEBIAN libresample1-dev libc-client2007e-dev binutils-dev libsrtp0-dev libsrtp2-dev libgsm1-dev doxygen graphviz zlib1g-dev libldap2-dev"
31 PACKAGES_DEBIAN="$PACKAGES_DEBIAN libcodec2-dev libfftw3-dev libsndfile1-dev libunbound-dev"
32 # Asterisk: for the unpackaged below:
33 PACKAGES_DEBIAN="$PACKAGES_DEBIAN wget subversion"
34 # Asterisk: for ./configure --with-pjproject-bundled:
35 PACKAGES_DEBIAN="$PACKAGES_DEBIAN bzip2 patch python-dev"
36
37 # Basic build system:
38 PACKAGES_RH="make gcc gcc-c++ pkgconfig"
39 # Asterisk: basic requirements:
40 PACKAGES_RH="$PACKAGES_RH libedit-devel jansson-devel libuuid-devel sqlite-devel libxml2-devel"
41 # Asterisk: for addons:
42 PACKAGES_RH="$PACKAGES_RH speex-devel speexdsp-devel libogg-devel libvorbis-devel alsa-lib-devel portaudio-devel libcurl-devel xmlstarlet bison flex"
43 PACKAGES_RH="$PACKAGES_RH postgresql-devel unixODBC-devel neon-devel gmime-devel lua-devel uriparser-devel libxslt-devel openssl-devel"
44 PACKAGES_RH="$PACKAGES_RH mysql-devel bluez-libs-devel radcli-devel freetds-devel jack-audio-connection-kit-devel bash"
45 PACKAGES_RH="$PACKAGES_RH net-snmp-devel iksemel-devel corosynclib-devel newt-devel popt-devel libical-devel spandsp-devel"
46 PACKAGES_RH="$PACKAGES_RH libresample-devel uw-imap-devel binutils-devel libsrtp-devel gsm-devel doxygen graphviz zlib-devel openldap-devel hoard"
47 PACKAGES_RH="$PACKAGES_RH codec2-devel fftw-devel libsndfile-devel unbound-devel"
48 # Asterisk: for the unpackaged below:
49 PACKAGES_RH="$PACKAGES_RH wget subversion"
50 # Asterisk: for ./configure --with-pjproject-bundled:
51 PACKAGES_RH="$PACKAGES_RH bzip2 patch python-devel"
52
53 # Basic build system:
54 PACKAGES_SUSE="make gcc gcc-c++ pkg-config"
55 # Asterisk: basic requirements:
56 PACKAGES_SUSE="$PACKAGES_SUSE libedit-devel libjansson-devel libuuid-devel sqlite3-devel libxml2-devel"
57 # Asterisk: for addons:
58 PACKAGES_SUSE="$PACKAGES_SUSE speex-devel speexdsp-devel libogg-devel libvorbis-devel alsa-devel portaudio-devel libcurl-devel xmlstarlet bison flex"
59 PACKAGES_SUSE="$PACKAGES_SUSE postgresql-devel unixODBC-devel libneon-devel gmime-devel lua-devel liburiparser-devel libxslt-devel libopenssl-devel"
60 PACKAGES_SUSE="$PACKAGES_SUSE libmysqlclient-devel bluez-devel freeradius-client-devel freetds-devel bash"
61 PACKAGES_SUSE="$PACKAGES_SUSE net-snmp-devel iksemel-devel libcorosync-devel newt-devel popt-devel libical-devel spandsp-devel"
62 PACKAGES_SUSE="$PACKAGES_SUSE imap-devel libsrtp2-devel libgsm-devel doxygen graphviz zlib-devel openldap2-devel"
63 PACKAGES_SUSE="$PACKAGES_SUSE codec2-devel fftw3-devel libsndfile-devel unbound-devel"
64 # Asterisk: for the unpackaged below:
65 PACKAGES_SUSE="$PACKAGES_SUSE wget subversion"
66 # Asterisk: for ./configure --with-pjproject-bundled:
67 PACKAGES_SUSE="$PACKAGES_SUSE bzip2 patch python-devel"
68
69 # Basic build system:
70 PACKAGES_ARCH="make gcc pkg-config"
71 # Asterisk: basic requirements:
72 PACKAGES_ARCH="$PACKAGES_ARCH libedit jansson libutil-linux libxml2 sqlite"
73 # Asterisk: for addons:
74 PACKAGES_ARCH="$PACKAGES_ARCH speex speexdsp libogg libvorbis alsa-lib portaudio curl xmlstarlet bison flex"
75 PACKAGES_ARCH="$PACKAGES_ARCH postgresql-libs unixodbc neon gmime lua uriparser libxslt openssl"
76 PACKAGES_ARCH="$PACKAGES_ARCH libmariadbclient bluez-libs radcli freetds bash"
77 PACKAGES_ARCH="$PACKAGES_ARCH net-snmp libnewt popt libical spandsp"
78 PACKAGES_ARCH="$PACKAGES_ARCH c-client binutils libsrtp gsm doxygen graphviz zlib libldap"
79 PACKAGES_ARCH="$PACKAGES_ARCH fftw libsndfile unbound"
80 # Asterisk: for the unpackaged below:
81 PACKAGES_ARCH="$PACKAGES_ARCH wget subversion"
82 # Asterisk: for ./configure --with-pjproject-bundled:
83 PACKAGES_ARCH="$PACKAGES_ARCH bzip2 patch python2"
84
85 # Basic build system:
86 PACKAGES_GENTOO="sys-devel/make sys-devel/gcc dev-util/pkgconfig"
87 # Asterisk: basic requirements:
88 PACKAGES_GENTOO="$PACKAGES_GENTOO dev-libs/libedit dev-libs/jansson sys-libs/e2fsprogs-libs dev-libs/libxml2 dev-db/sqlite"
89 # Asterisk: for addons:
90 PACKAGES_GENTOO="$PACKAGES_GENTOO media-libs/speex media-libs/speexdsp media-libs/libogg media-libs/libvorbis media-libs/alsa-lib media-libs/portaudio net-misc/curl app-text/xmlstarlet sys-devel/bison sys-devel/flex"
91 PACKAGES_GENTOO="$PACKAGES_GENTOO dev-db/postgresql dev-db/unixODBC net-libs/neon dev-libs/gmime dev-lang/lua dev-libs/uriparser dev-libs/libxslt dev-libs/openssl"
92 PACKAGES_GENTOO="$PACKAGES_GENTOO virtual/libmysqlclient net-wireless/bluez net-dialup/radiusclient-ng dev-db/freetds app-shells/bash"
93 PACKAGES_GENTOO="$PACKAGES_GENTOO net-analyzer/net-snmp dev-libs/iksemel sys-cluster/corosync dev-libs/newt dev-libs/popt dev-libs/libical media-libs/spandsp"
94 PACKAGES_GENTOO="$PACKAGES_GENTOO net-libs/c-client sys-devel/binutils net-libs/libsrtp media-sound/gsm media-libs/libilbc app-doc/doxygen sys-libs/zlib net-nds/openldap"
95 PACKAGES_GENTOO="$PACKAGES_GENTOO sci-libs/fftw media-libs/libsndfile net-dns/unbound"
96 # Asterisk: for the unpackaged below:
97 PACKAGES_GENTOO="$PACKAGES_GENTOO net-misc/wget dev-vcs/subversion"
98 # Asterisk: for ./configure --with-pjproject-bundled:
99 PACKAGES_GENTOO="$PACKAGES_GENTOO app-arch/bzip2 sys-devel/patch dev-lang/python:2.7"
100
101 # Basic build system:
102 PACKAGES_NBSD="gmake pkg-config"
103 # Asterisk: basic requirements:
104 PACKAGES_NBSD="$PACKAGES_NBSD editline jansson sqlite3 libuuid libxml2"
105 # Asterisk: for addons:
106 PACKAGES_NBSD="$PACKAGES_NBSD speex speexdsp libogg libvorbis alsa-lib portaudio-devel curl bison flex"
107 PACKAGES_NBSD="$PACKAGES_NBSD postgresql10-client unixodbc neon gmime lua52 uriparser libxslt openssl"
108 PACKAGES_NBSD="$PACKAGES_NBSD mysql-client radiusclient-ng freetds bash"
109 PACKAGES_NBSD="$PACKAGES_NBSD net-snmp iksemel popt libical spandsp"
110 PACKAGES_NBSD="$PACKAGES_NBSD imap-uw srtp gsm doxygen graphviz libzip openldap-client"
111 PACKAGES_NBSD="$PACKAGES_NBSD codec2 fftw libsndfile unbound"
112 # Asterisk: for the unpackaged below:
113 PACKAGES_NBSD="$PACKAGES_NBSD wget subversion-base"
114 # Asterisk: for ./configure --with-pjproject-bundled:
115 PACKAGES_NBSD="$PACKAGES_NBSD bzip2 patch python27"
116
117 # Basic build system:
118 PACKAGES_OBSD="gmake"
119 # Asterisk: basic requirements:
120 PACKAGES_OBSD="$PACKAGES_OBSD libxml sqlite3 e2fsprogs jansson"
121 # Asterisk: for addons:
122 PACKAGES_OBSD="$PACKAGES_OBSD speex speexdsp libogg libvorbis portaudio-svn curl xmlstarlet bison"
123 PACKAGES_OBSD="$PACKAGES_OBSD postgresql-client iodbc neon gmime lua%5.2 uriparser libxslt"
124 PACKAGES_OBSD="$PACKAGES_OBSD mariadb-client radcli freetds"
125 PACKAGES_OBSD="$PACKAGES_OBSD net-snmp iksemel popt libical spandsp"
126 PACKAGES_OBSD="$PACKAGES_OBSD c-client libsrtp gsm doxygen graphviz"
127 PACKAGES_OBSD="$PACKAGES_OBSD fftw3 libsndfile"
128 # Asterisk: for the unpackaged below:
129 PACKAGES_OBSD="$PACKAGES_OBSD wget subversion"
130 # Asterisk: for ./configure --with-pjproject-bundled:
131 PACKAGES_OBSD="$PACKAGES_OBSD bzip2 python%2"
132
133 # Basic build system:
134 PACKAGES_FBSD="gmake pkgconf"
135 # Asterisk: basic requirements:
136 PACKAGES_FBSD="$PACKAGES_FBSD libedit jansson e2fsprogs-libuuid sqlite3 libxml2"
137 # Asterisk: for addons:
138 PACKAGES_FBSD="$PACKAGES_FBSD speex speexdsp libogg libvorbis alsa-lib portaudio curl xmlstarlet bison flex"
139 PACKAGES_FBSD="$PACKAGES_FBSD postgresql10-client unixODBC neon gmime26 lua52 uriparser libxslt openssl"
140 PACKAGES_FBSD="$PACKAGES_FBSD mysql57-client radcli freetds"
141 PACKAGES_FBSD="$PACKAGES_FBSD net-snmp iksemel corosync newt popt libical spandsp"
142 PACKAGES_FBSD="$PACKAGES_FBSD cclient libbfd libsrtp gsm libilbc doxygen graphviz libzip openldap-client libhoard"
143 PACKAGES_FBSD="$PACKAGES_FBSD codec2 fftw3 libsndfile unbound"
144 # Asterisk: for the unpackaged below:
145 PACKAGES_FBSD="$PACKAGES_FBSD wget subversion"
146 # Asterisk: for ./configure --with-pjproject-bundled:
147 PACKAGES_FBSD="$PACKAGES_FBSD bzip2 patch python"
148
149 # Basic build system:
150 PACKAGES_DBSD="gmake pkgconf"
151 # Asterisk: basic requirements:
152 PACKAGES_DBSD="$PACKAGES_DBSD libedit jansson e2fsprogs-libuuid sqlite3 libxml2"
153 # Asterisk: for addons:
154 PACKAGES_DBSD="$PACKAGES_DBSD speex speexdsp libogg libvorbis alsa-lib portaudio curl xmlstarlet bison flex"
155 PACKAGES_DBSD="$PACKAGES_DBSD postgresql10-client unixODBC neon gmime26 lua52 uriparser libxslt libressl"
156 PACKAGES_DBSD="$PACKAGES_DBSD mariadb101-client radcli freetds"
157 PACKAGES_DBSD="$PACKAGES_DBSD net-snmp iksemel corosync newt popt libical spandsp"
158 PACKAGES_DBSD="$PACKAGES_DBSD cclient binutils libsrtp gsm libilbc doxygen graphviz libzip openldap-client libhoard"
159 PACKAGES_DBSD="$PACKAGES_DBSD codec2 fftw3 libsndfile unbound"
160 # Asterisk: for the unpackaged below:
161 PACKAGES_DBSD="$PACKAGES_DBSD wget subversion"
162 # Asterisk: for ./configure --with-pjproject-bundled:
163 PACKAGES_DBSD="$PACKAGES_DBSD bzip2 patch python"
164
165 KVERS=`uname -r`
166
167 JANSSON_VER=2.11
168
169 case "$1" in
170 test)
171         testcmd=echo
172         ;;
173 install)
174         testcmd=''
175         ;;
176 install-unpackaged)
177         unpackaged="yes"
178         ;;
179 '')
180         usage
181         exit 0
182         ;;
183 *)
184         usage
185         exit 1
186         ;;
187 esac
188
189 in_test_mode() {
190         test "$testcmd" != ''
191 }
192
193 check_installed_debs() {
194         for pack in "$@" ; do
195                 tocheck="${tocheck} ^${pack}$ ~P^${pack}$"
196         done
197         pkgs=$(aptitude -F '%c %p' search ${tocheck} 2>/dev/null | awk '/^p/{print $2}')
198         if [ ${#pkgs} -ne 0 ]; then
199                 echo $pkgs | sed -r -e "s/ ?[^ :]+:i386//g"
200         fi
201 }
202
203 # parsing the output of yum is close to impossible.
204 # We'll use rpm and hope for the best:
205 check_installed_rpms() {
206         for pack in "$@"
207         do
208                 if ! rpm -q $pack >/dev/null 2>/dev/null
209                 then echo $pack
210                 fi
211         done
212 }
213
214 check_installed_equery() {
215         for pack in "$@"
216         do
217                 # equery --quiet list $pack
218                 # is slower and
219                 # would require the optional app-portage/gentoolkit
220                 # /var/lib/portage/world would be the non-dep list
221                 pack_with_version=${pack/:/-} # replace a possible version with '-'
222                 if ! ls -d /var/db/pkg/${pack_with_version}* >/dev/null 2>/dev/null
223                 then echo $pack
224                 fi
225         done
226 }
227
228 check_installed_pacman() {
229         for pack in "$@"
230         do
231                 if ! pacman -Q --explicit $pack >/dev/null 2>/dev/null
232                 then echo $pack
233                 fi
234         done
235 }
236
237 check_installed_pkgs() {
238         for pack in "$@"
239         do
240                 if [ `pkg_info -a | grep $pack | wc -l` = 0 ]; then
241                 echo $pack
242                 fi
243         done
244 }
245
246 check_installed_fpkgs() {
247         for pack in "$@"
248         do
249                 if [ `pkg info -a | grep $pack | wc -l` = 0 ]; then
250                 echo $pack
251                 fi
252         done
253 }
254
255 check_installed_zypper() {
256         for pack in "$@"
257         do
258                 if ! zypper se -ixnC $pack >/dev/null 2>/dev/null
259                 then echo $pack
260                 fi
261         done
262 }
263
264 handle_debian() {
265         if ! [ -x "$(command -v aptitude)" ]; then
266                 apt-get install aptitude
267         fi
268         extra_packs=`check_installed_debs $PACKAGES_DEBIAN`
269         $testcmd aptitude update
270         if [ x"$extra_packs" != "x" ] ; then
271                 $testcmd aptitude install -y $extra_packs
272         fi
273 }
274
275 handle_rh() {
276         extra_packs=`check_installed_rpms $PACKAGES_RH`
277         if [ x"$extra_packs" != "x" ] ; then
278                 $testcmd yum install --skip-broken --assumeyes $extra_packs
279         fi
280 }
281
282 handle_gentoo() {
283         extra_packs=`check_installed_equery $PACKAGES_GENTOO`
284         if [ x"$extra_packs" != "x" ] ; then
285                 $testcmd emerge $extra_packs
286         fi
287 }
288
289 handle_arch() {
290         extra_packs=`check_installed_pacman $PACKAGES_ARCH`
291         if [ x"$extra_packs" != "x" ] ; then
292                 $testcmd pacman -S --asexplicit --noconfirm $extra_packs
293         fi
294 }
295
296 handle_nbsd() {
297         extra_packs=`check_installed_pkgs $PACKAGES_NBSD`
298         if [ x"$extra_packs" != "x" ] ; then
299                 if [ -z "$PKG_PATH" ] ; then
300                         # see NetBSD Problem Report #48177
301                         export PKG_PATH="http://cdn.NetBSD.org/pub/pkgsrc/packages/$(uname -s)/$(uname -p)/$(uname -r)/All"
302                 fi
303                 $testcmd pkg_add $extra_packs
304         fi
305 }
306
307 handle_obsd() {
308         extra_packs=`check_installed_pkgs $PACKAGES_OBSD`
309         if [ x"$extra_packs" != "x" ] ; then
310                 $testcmd pkg_add $extra_packs
311         fi
312 }
313
314 handle_fbsd() {
315         extra_packs=`check_installed_fpkgs $PACKAGES_FBSD`
316         if [ x"$extra_packs" != "x" ] ; then
317                 $testcmd pkg install -y $extra_packs
318         fi
319 }
320
321 handle_dbsd() {
322         extra_packs=`check_installed_fpkgs $PACKAGES_DBSD`
323         if [ x"$extra_packs" != "x" ] ; then
324                 $testcmd pkg install -y $extra_packs
325         fi
326 }
327
328 handle_SUSE() {
329         extra_packs=`check_installed_zypper $PACKAGES_SUSE`
330         if [ x"$extra_packs" != "x" ] ; then
331                 $testcmd zypper install --no-confirm $extra_packs
332         fi
333 }
334
335 install_unpackaged() {
336         echo "*** Installing NBS (Network Broadcast Sound) ***"
337         svn co http://svn.digium.com/svn/nbs/trunk nbs-trunk
338         cd nbs-trunk
339         make all install
340         cd ..
341
342         # Only install libresample if it wasn't installed via package
343         if ! test -f /usr/include/libresample.h; then
344                 echo "*** Installing libresample ***"
345                 svn co http://svn.digium.com/svn/thirdparty/libresample/trunk libresample-trunk
346                 cd libresample-trunk
347                 ./configure
348                 make all install
349                 cd ..
350         fi
351
352         # Only install Jansson if it wasn't installed via package
353         if ! test -f /usr/include/jansson.h; then
354                 echo "*** Installing jansson ***"
355                 wget -O - http://www.digip.org/jansson/releases/jansson-${JANSSON_VER}.tar.gz | zcat | tar -xf -
356                 cd jansson-${JANSSON_VER}
357                 ./configure
358                 make all install
359                 cd ..
360                 if test -d /etc/ld.so.conf.d; then
361                         echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local.conf
362                 else # for example: Slackware 14.2
363                         echo "/usr/local/lib" > /etc/ld.so.conf
364                 fi
365                 /sbin/ldconfig
366         fi
367
368         # Only install libsrtp2 if it wasn't installed via package
369         if ! test -f /usr/include/srtp/srtp.h; then
370                 if ! test -f /usr/include/srtp2/srtp.h; then
371                         echo "*** Installing libsrtp2 ***"
372                         wget -O - http://github.com/cisco/libsrtp/archive/v2.tar.gz | zcat | tar -xf -
373                         cd libsrtp-2
374                         ./configure --enable-openssl
375                         make shared_library install
376                         cd ..
377                         if test -d /etc/ld.so.conf.d; then
378                                 echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local.conf
379                         else # for example: Slackware 14.2
380                                 echo "/usr/local/lib" > /etc/ld.so.conf
381                         fi
382                         /sbin/ldconfig
383                 fi
384         fi
385
386         if ! test -f /usr/include/pjlib.h; then
387                 echo "PJProject not installed, yet. Therefore, please, run"
388                 echo "./configure --with-pjproject-bundled"
389         fi
390 }
391
392 if in_test_mode; then
393         echo "#############################################"
394         echo "## $1: test mode."
395         echo "## Use the commands here to install your system."
396         echo "#############################################"
397 elif test "${unpackaged}" = "yes" ; then
398         install_unpackaged
399         exit 0
400 fi
401
402 OS=`uname -s`
403 unsupported_distro=''
404
405 # A number of distributions we don't (yet?) support.
406 if [ "$OS" != 'Linux' -a "$OS" != 'NetBSD' -a "$OS" != 'OpenBSD' -a "$OS" != 'FreeBSD' -a "$OS" != 'DragonFly' ]; then
407         echo >&2 "$0: Your OS ($OS) is currently not supported. Aborting."
408         exit 1
409 fi
410
411 if [ -f /etc/mandrake-release ]; then
412         unsupported_distro='Mandriva'
413 fi
414
415 if [ -f /etc/slackware-version ] || ([ -f /etc/os-release ] && . /etc/os-release && [ "$ID" = "slackware" ]); then
416         echo >&2 "$0: Your distribution (Slackware) is currently not supported. Aborting. Try manually:"
417         # libedit requires a newer version than Slackware 14.2, for example Slackware-current
418         # or you build it manually: <http://thrysoee.dk/editline/>
419         echo >&2 "$0: # slackpkg install make gcc pkg-config libedit util-linux sqlite libxml2 patch wget"
420         # required for libjansson
421         echo >&2 "$0: # ./contrib/scripts/install_prereq install-unpackaged"
422         exit 1
423 fi
424
425 if [ "$unsupported_distro" != '' ]; then
426         echo >&2 "$0: Your distribution ($unsupported_distro) is currently not supported. Aborting."
427         exit 1
428 fi
429
430 # The distributions we do support:
431 if [ -r /etc/debian_version ]; then
432         handle_debian
433 elif [ -r /etc/redhat-release ]; then
434         handle_rh
435 elif [ -f /etc/SuSE-release -o -f /etc/novell-release ]; then
436         handle_SUSE
437 elif [ -f /etc/os-release ] && . /etc/os-release && [ "$ID" = "opensuse" ]; then
438         handle_SUSE
439 elif [ -r /etc/arch-release ]; then
440         handle_arch
441 elif [ -f /etc/os-release ] && . /etc/os-release && [ "$ID_LIKE" = "archlinux" ]; then
442         handle_arch # $ID=arch
443 elif [ -f /etc/gentoo-release ]; then
444         handle_gentoo
445 elif [ -f /etc/os-release ] && . /etc/os-release && [ "$ID" = "gentoo" ]; then
446         handle_gentoo
447 elif [ "$OS" = 'NetBSD' ]; then
448         handle_nbsd
449 elif [ "$OS" = 'OpenBSD' ]; then
450         handle_obsd
451 elif [ "$OS" = 'FreeBSD' ]; then
452         handle_fbsd
453 elif [ "$OS" = 'DragonFly' ]; then
454         handle_dbsd
455 fi
456
457 if ! in_test_mode; then
458         echo "#############################################"
459         echo "## $1 completed successfully"
460         echo "#############################################"
461 fi