On 10/6/2014 7:42 AM, PGNd wrote:
> if
> 
>       cat shorewallrc.suse
>               ...
> -             SERVICEFILE=${PRODUCT}.service
> +             SERVICEFILE=${PRODUCT}-TEST.service
>               ...
> 
> then build, depoly tarballs, and
> 
> cd shorewall-4.6.4-Beta2-36-g4398fb2
> sh -x ./install.sh shorewallrc.suse
>       ...
>       + chmod 755 /usr/local/shorewall-custom/share/shorewall/configfiles
>       + '[' -n '' ']'
>       + '[' -n /usr/local/shorewall-custom/etc/systemd ']'
>       + mkdir -p /usr/local/shorewall-custom/etc/systemd
>       + '[' -z shorewall-TEST.service ']'
>       + run_install -o root -g root -m 644 shorewall-TEST.service 
> /usr/local/shorewall-custom/etc/systemd/shorewall.service
>       + install -o root -g root -m 644 shorewall-TEST.service 
> /usr/local/shorewall-custom/etc/systemd/shorewall.service
>       install: cannot stat ‘shorewall-TEST.service’: No such file or directory
>       + echo
> 
>       + echo 'ERROR: Failed to install -o root -g root -m 644 
> shorewall-TEST.service 
> /usr/local/shorewall-custom/etc/systemd/shorewall.service'
>       ERROR: Failed to install -o root -g root -m 644 shorewall-TEST.service 
> /usr/local/shorewall-custom/etc/systemd/shorewall.service
>       + exit 1
> 
> this arises from
> 
>       cat install.sh
>               ...
> 426           #
>               # Install the .service file
>               #
>               if [ -n "$SYSTEMD" ]; then
>                   mkdir -p ${DESTDIR}${SYSTEMD}
>                   [ -z "$SERVICEFILE" ] && SERVICEFILE=$PRODUCT.service
>                   run_install $OWNERSHIP -m 644 $SERVICEFILE 
> ${DESTDIR}${SYSTEMD}/$PRODUCT.service
>                   [ ${SBINDIR} != /sbin ] && eval sed -i 
> \'s\|/sbin/\|${SBINDIR}/\|\' ${DESTDIR}${SYSTEMD}/$PRODUCT.service
>                   echo "Service file $SERVICEFILE installed as 
> ${DESTDIR}${SYSTEMD}/$PRODUCT.service"
>               fi
> 
> since, in shorewallrc,
> 
>       SERVICEFILE=${PRODUCT}-TEST.service
> 
> then
> 
>       [ -z "$SERVICEFILE" ]
> 
> returns true, and should NOT be redefined, ignoring the set value
> 
> mod'ing
> 
>       vi install.sh
>               ...
> 430               mkdir -p ${DESTDIR}${SYSTEMD}
> -                 [ -z "$SERVICEFILE" ] && SERVICEFILE=$PRODUCT.service
> +                 [ ! -z "$SERVICEFILE" ] && SERVICEFILE=$PRODUCT.service
>               ...
> 
> now
> 
>       sh -x ./install.sh shorewallrc.suse
>               ...
>               Shorewall Version 4.6.4-Beta2-36-g4398fb2 Installed
> 
> common in
> 
> grep "\"\$SERVICEFILE\"" `grep -rlni SERVICEFILE */install.sh`
>       shorewall-4.6.4-Beta2-36-g4398fb2/install.sh:    [  -z "$SERVICEFILE" ] 
> && SERVICEFILE=$PRODUCT.service
>       shorewall6-4.6.4-Beta2-36-g4398fb2/install.sh:    [ -z "$SERVICEFILE" ] 
> && SERVICEFILE=$PRODUCT.service
>       shorewall6-lite-4.6.4-Beta2-36-g4398fb2/install.sh:    [ -z 
> "$SERVICEFILE" ] && SERVICEFILE=$PRODUCT.service
>       shorewall-init-4.6.4-Beta2-36-g4398fb2/install.sh:    [ -z 
> "$SERVICEFILE" ] && SERVICEFILE=$PRODUCT.service
>       shorewall-lite-4.6.4-Beta2-36-g4398fb2/install.sh:    [ -z 
> "$SERVICEFILE" ] && SERVICEFILE=$PRODUCT.service
> 

Analogous to INITFILE, SERVICEFILE is intended to be the name of the
*source* file, not the destination file.

-Tom
-- 
Tom Eastep        \ When I die, I want to go like my Grandfather who
Shoreline,         \ died peacefully in his sleep. Not screaming like
Washington, USA     \ all of the passengers in his car
http://shorewall.net \________________________________________________

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Slashdot TV.  Videos for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
Shorewall-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to