X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage3%2Fcis-sane-backends;h=c1b88870d80b989fad5b941f54d7ebb449e75ee1;hb=532a0d1a77242192d6809b03ec7c14e271e29e82;hp=9f1b3559129d76cef4008e468206555f786cb5e4;hpb=16cc35ba4890382ee9368a176e4f5a7fa773b7a6;p=hvlinux.git diff --git a/stage3/cis-sane-backends b/stage3/cis-sane-backends index 9f1b355..c1b8887 100755 --- a/stage3/cis-sane-backends +++ b/stage3/cis-sane-backends @@ -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. @@ -7,7 +9,7 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} if [ x${INST_TYPE} = "xworkstation" ]; then USE_X_OPTION="yes" @@ -15,59 +17,57 @@ else USE_X_OPTION="no" fi -hv_groupadd saned && -hv_useradd -c saned -d /dev/null -g saned -s /bin/false saned && +hv_groupadd saned +hv_useradd -c saned -d /dev/null -g saned -s /bin/false saned # Problem with build directory -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${1} ./configure \ --prefix=/usr \ --sysconfdir=/etc \ - --with-x=${USE_X_OPTION} && + --with-x=${USE_X_OPTION} # If the 'SANE_DRIVER' variable is defined in the 'sysinfos' file, then # we build that driver and the 'net' driver only. Otherwise, only the 'net' # driver is built. We do so by modifying the 'PRELOADABLE_BACKENDS' variable # in 'backend/Makefile'. -cp backend/Makefile backend/Makefile.bak && +cp backend/Makefile backend/Makefile.bak cat backend/Makefile.bak \ | sed "s/\(PRELOADABLE_BACKENDS =\).*/\1 ${SANE_DRIVER} net/" \ - > backend/Makefile && + > backend/Makefile # Removing the program umax_pp, since it depends on some umax driver. -cp tools/Makefile tools/Makefile.bak && +cp tools/Makefile tools/Makefile.bak cat tools/Makefile.bak \ - | sed "s/\(DESTINATIONS =.*\)umax_pp\(.*\)/\1\2/" > tools/Makefile && + | sed "s/\(DESTINATIONS =.*\)umax_pp\(.*\)/\1\2/" > tools/Makefile -make && -make install && -ldconfig && +make +make install +ldconfig # Addition to /etc/services (for both the client and server) string_add "sane 6566/tcp saned # SANE Network Scanner Daemon" \ - /etc/services && + /etc/services # Creating '/etc/sane.d/dll.conf' and adding entry 'net' echo "net" > /etc/sane.d/dll.conf -evaluate_retval if [ -z "${SANE_SERVER}" ]; then # If 'SANE_SERVER' is not defined, then we automatically configure for # the SANE Network Daemon. # Adding entry to '/etc/sane.d/dll.conf' - echo "${SANE_DRIVER}" >> /etc/sane.d/dll.conf || exit 1 + echo "${SANE_DRIVER}" >> /etc/sane.d/dll.conf # Creating '/etc/sane.d/saned.conf' - echo "${LAN_NETWORK_MASK}" > /etc/sane.d/saned.conf || exit 1 + echo "${LAN_NETWORK_MASK}" > /etc/sane.d/saned.conf # Addition to /etc/inetd.conf string_add "sane stream tcp nowait saned /usr/sbin/tcpd saned" \ - /etc/inetd.conf || exit 1 + /etc/inetd.conf else # If 'SANE_SERVER' is defined, then we must specify the address of the # remote SANE server to use. - echo "${SANE_SERVER}" > /etc/sane.d/net.conf || exit 1 + echo "${SANE_SERVER}" > /etc/sane.d/net.conf fi -# Return last error exit $?