Re: ppp and ip-up.d, ip-down.d
Marc Haber wrote:
>>On Tue, Dec 08, 1998 at 01:10:06PM +0000, Marc Haber wrote:
>>> As you see, ip-up and ip-down export $PPP_OPERATION which is either
>>> "up" or "down" and proceed to call run-parts /etc/ppp/ip.d.
>>
>>What about passing "up" and "down" as first argument. This is more likely t
>he
>>init-scripts of SysV-Init...
If you are using the standard names, ip-up and ip-down, you do not need
to pass parameters or set environmental variables; simply examine the
first value of the argument list to see which you have:
prog=`basename $0`
if [ $prog = ip-up ]
then
# Up actions
elif [ $prog = ip-down ]
then
# Down actions
else
echo "Script called with unrecognised name: call it ip-up or ip-down"
exit 1
end
--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP key from public servers; key ID 32B8FAA1
========================================
"I beseech you therefore, brethren, by the mercies of
God, that ye present your bodies a living sacrifice,
holy, acceptable unto God, which is your reasonable
service." Romans 12:1
Reply to: