#!/bin/sh # First argument of this script is the package name # Reading system configuration informations, functions and package versions. source ../sysinfos source ../functions source ../packages-list CUR_DIR=$(pwd) # Applying patches (if any) apply_patches ${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} && ./configure && make && make install && # For a remote CUPS print server if [ -n "${CUPS_SERVER}" ]; then cat > /etc/cups/client.conf << "EOF" && ######################################################################## # # # This is the CUPS client configuration file. This file is used to # # define client-specific parameters, such as the default server or # # default encryption settings. # # # ######################################################################## # # ServerName: the hostname of your server. By default CUPS will use the # hostname of the system or the value of the CUPS_SERVER environment # variable. ONLY ONE SERVER NAME MAY BE SPECIFIED AT A TIME. To use # more than one server you must use a local scheduler with browsing # and possibly polling. # 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 && install -v -m740 ${CUR_DIR}/bootscripts/cups /etc/rc.d/init.d && # script-name start stop bootscript_add_rc3 cups 40 50 # Return last error exit $?