X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=sbin%2Fgrml-pptp-inode;h=abef0593e15c46d1ca48ea80856d97bdd323b8c7;hb=6491538dd1b832fcae56d058b2a0685f2e643460;hp=3c61d337fb7798e175bfe297128b6f034d715bd9;hpb=5ccffd6ee849bb7c004e464f3972bcce22beac7c;p=grml-network.git diff --git a/sbin/grml-pptp-inode b/sbin/grml-pptp-inode index 3c61d33..abef059 100755 --- a/sbin/grml-pptp-inode +++ b/sbin/grml-pptp-inode @@ -14,9 +14,8 @@ export LANG=C -if [ $UID != 0 ] ; then - echo Error: become root before starting $0 >& 2 - exit 100 +if [ $(id -ru) -ne 0 ] ; then + echo 1>&2 "Error: please run this script with uid 0 (root)." ; exit 1 fi if [ -z "$FORCE_OLD" ] ; then @@ -46,7 +45,7 @@ EOF echo "${VPNUSERNAME} XDSL ${VPNPASSWORD} *" >> /etc/ppp/pap-secrets chmod 0600 /etc/ppp/pap-secrets -echo -e "#!/bin/sh\nLANG=C\nVPNSERVER=\"${VPNSERVER}\"\n" > /etc/init.d/pptp +printf "#!/bin/sh\nLANG=C\nVPNSERVER=\"${VPNSERVER}\"\n" > /etc/init.d/pptp cat >> /etc/init.d/pptp << "EOF"