X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage5%2Fpkg%2Fcups;h=52e5a54202c119fdeb1497ae83a49d513cf481c5;hb=f3c8db3027d5dc530e1f30c88e0235975211582e;hp=667abfe181a74a8730cfd0580a0b2694c52a4a52;hpb=0fb786eca497edb316e1dfaa4a4ccec2d6b3f694;p=hvlinux.git diff --git a/stage5/pkg/cups b/stage5/pkg/cups index 667abfe..52e5a54 100644 --- a/stage5/pkg/cups +++ b/stage5/pkg/cups @@ -1,30 +1,17 @@ -#!/bin/sh -set -o errexit +#!/bin/bash -# First argument of this script is the package name +hvconfig_pre() +{ + hv_useradd -c "Print_Service_User" -d /dev/null -g lp -s /bin/false -u 9 lp -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list + CONFIGURE_OPTS="" +} -PACKAGE=${1} -shift -CONFIGURE_OPTS=${*} - -# Applying patches (if any) -apply_patches ${PACKAGE} - -hv_useradd -c "Print_Service_User" -d /dev/null -g lp -s /bin/false -u 9 lp - -cd ${LFS_TMP}/${PACKAGE} -./configure -make -make install - -if [ -n "${CUPS_SERVER}" ]; then - # Configuring for connection to a remote CUPS print server - cat > /etc/cups/client.conf << "EOF" +hvbuild_pre() +{ + if [ -n "${CUPS_SERVER}" ]; then + # Configuring for connection to a remote CUPS print server + cat > /etc/cups/client.conf << "EOF" ######################################################################## # # # This is the CUPS client configuration file. This file is used to # @@ -41,15 +28,14 @@ if [ -n "${CUPS_SERVER}" ]; then # and possibly polling. # EOF - echo "ServerName ${CUPS_SERVER}" >> /etc/cups/client.conf -else - # Configuring for a CUPS print server - sed -i -e 's@Listen localhost:631@Listen \*:631@' /etc/cups/cupsd.conf -fi - -install -v -m740 ${SCRDIR}/bootscripts/cups /etc/rc.d/init.d + echo "ServerName ${CUPS_SERVER}" >> /etc/cups/client.conf + else + # Configuring for a CUPS print server + sed -i -e 's@Listen localhost:631@Listen \*:631@' /etc/cups/cupsd.conf + fi -# script-name start stop -bootscript_add_rc3 cups 40 50 + install -v -m740 ${SCRDIR}/bootscripts/cups /etc/rc.d/init.d -exit $? + # script-name start stop + bootscript_add_rc3 cups 40 50 +}