Add debian/control headers Origin, Bugs
[grml-network.git] / sbin / grml-pptp-inode
index 9446067..abef059 100755 (executable)
@@ -4,7 +4,6 @@
 # Authors:       grml-team (grml.org), (c) Andreas Gredler <jimmy@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Tue Jul 22 01:13:08 CEST 2008 [mika]
 ################################################################################
 
 ################################################################################
@@ -15,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
@@ -47,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"