Started work on stage5
[hvlinux.git] / stage3 / cis-samba
index 8c2a423..24ab9e9 100755 (executable)
@@ -1,4 +1,6 @@
 #!/bin/sh
+set -o errexit
+
 # First argument of this script is the package name
 
 # Reading system configuration informations, functions and package versions.
@@ -6,55 +8,51 @@ source ../sysinfos
 source ../functions
 source ../packages-list
 
-CUR_DIR=$(pwd)
-
 # Applying patches (if any)
-apply_patches ${1} &&
+apply_patches ${1}
 
-install -d /var/cache/samba &&
+install -d /var/cache/samba
 
-cd ${LFS_TMP}/${1}/source &&
+cd ${LFS_TMP}/${1}/source
 ./configure \
     --prefix=/usr \
     --sysconfdir=/etc \
     --localstatedir=/var \
     --with-piddir=/var/run \
     --with-fhs \
-    --with-smbmount &&
-make &&
-make install &&
-mv /usr/lib/samba/libsmbclient.so /usr/lib &&
-ln -sf ../libsmbclient.so /usr/lib/samba &&
+    --with-smbmount
+make
+make install
+mv /usr/lib/samba/libsmbclient.so /usr/lib
+ln -sf ../libsmbclient.so /usr/lib/samba
 
-mkdir -p /var/log/samba &&
+mkdir -p /var/log/samba
 
 # libsmbclient.a doesn't seem to be installed...
-#chmod 644 /usr/include/libsmbclient.h /usr/lib/samba/libsmbclient.a &&
-chmod 644 /usr/include/libsmbclient.h &&
+#chmod 644 /usr/include/libsmbclient.h /usr/lib/samba/libsmbclient.a
+chmod 644 /usr/include/libsmbclient.h
 
-install -m755 nsswitch/libnss_win{s,bind}.so /lib &&
-ln -sf libnss_winbind.so /lib/libnss_winbind.so.2 &&
-ln -sf libnss_wins.so /lib/libnss_wins.so.2 &&
-cp ../examples/smb.conf.default /etc/samba &&
+install -m755 nsswitch/libnss_win{s,bind}.so /lib
+ln -sf libnss_winbind.so /lib/libnss_winbind.so.2
+ln -sf libnss_wins.so /lib/libnss_wins.so.2
+cp ../examples/smb.conf.default /etc/samba
 install -m644 ../docs/*.pdf /usr/share/samba
-evaluate_retval
 
 if [ -f nsswitch/pam_winbind.so ]; then 
-    install -m755 nsswitch/pam_winbind.so /lib/security || exit 1
+    install -m755 nsswitch/pam_winbind.so /lib/security
 fi
 
-ldconfig &&
+ldconfig
 
 # Configuring SWAT
-string_add "swat            901/tcp" /etc/services &&
-string_add "swat_tunnel     902/tcp" /etc/services &&
-string_add "swat stream tcp nowait.400 root /usr/sbin/swat swat" /etc/inetd.conf &&
+string_add "swat            901/tcp" /etc/services
+string_add "swat_tunnel     902/tcp" /etc/services
+string_add "swat stream tcp nowait.400 root /usr/sbin/swat swat" /etc/inetd.conf
 
 # Bootscript
-install -v -m740 ${CUR_DIR}/bootscripts/samba /etc/rc.d/init.d &&
+install -v -m740 ${SCRDIR}/bootscripts/samba /etc/rc.d/init.d
 
 # script-name start stop
 bootscript_add_rc3 samba 85 10
 
-# Return last error
 exit $?