Mise à niveau début du stage3 avant X-window
[hvlinux.git] / stage3 / cis-cups
index b56b7e7..a6cba6a 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,25 +8,23 @@ source ../sysinfos
 source ../functions
 source ../packages-list
 
-CUR_DIR=$(pwd)
-
 # Applying patches (if any)
-apply_patches ${1} &&
+apply_patches ${1}
 
-cd ${LFS_TMP}/${1} &&
+cd ${LFS_TMP}/${1}
 
 # When using Linux-PAM, some files need to be modified so CUPS
 # can find needed headers.
 sed -i -e "s@pam/pam@security/pam@g" \
-    {config-scripts/cups-pam.m4,scheduler/auth.c,configure} &&
+    {config-scripts/cups-pam.m4,scheduler/auth.c,configure}
 
-./configure &&
-make &&
-make install &&
+./configure
+make
+make install
 
 # For a remote CUPS print server
 if [ -n "${CUPS_SERVER}" ]; then
-    cat > /etc/cups/client.conf << "EOF" &&
+    cat > /etc/cups/client.conf << "EOF"
 ########################################################################
 #                                                                      #
 # This is the CUPS client configuration file.  This file is used to    #
@@ -42,16 +42,14 @@ if [ -n "${CUPS_SERVER}" ]; then
 #
 EOF
     echo "ServerName ${CUPS_SERVER}" >> /etc/cups/client.conf
-    evaluate_retval
 fi
 
 # Modification to allow access from all hosts in internal LAN (192.168.0.x)
-sed -i -e "s!\(Allow From 127\.0\.0\.1\)!\1\nAllow From 192\.168\.0\.0/24!g" /etc/cups/cupsd.conf &&
+sed -i -e "s!\(Allow From 127\.0\.0\.1\)!\1\nAllow From 192\.168\.0\.0/24!g" /etc/cups/cupsd.conf
 
-install -v -m740 ${CUR_DIR}/bootscripts/cups /etc/rc.d/init.d &&
+install -v -m740 ${SCRDIR}/bootscripts/cups /etc/rc.d/init.d
 
 # script-name start stop
 bootscript_add_rc3 cups 40 50
 
-# Return last error
 exit $?