Add debian/control headers Origin, Bugs
[grml-network.git] / sbin / grml-pptp-vcgraz
index f9e3fdc..b1fe498 100755 (executable)
@@ -4,7 +4,6 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Sam Jän 26 00:12:57 CET 2008 [mika]
 ################################################################################
 
 ################################################################################
@@ -16,7 +15,7 @@
 export LANG=C
 export LC_ALL=C
 
-if [ "$UID" != 0 ];  then
+if [ $(id -ru) -ne 0 ] ; then
   sudo $0
   exit
 fi
@@ -52,7 +51,7 @@ chmod 600 /etc/ppp/chap-secrets
 # don't overwrite existing files - so just append:
 echo "${VPNUSERNAME} PPTP ${VPNPASSWORD} *" >> /etc/ppp/chap-secrets
 
-echo -e "#!/bin/sh\nLANG=C\nVPNSERVER=\"${VPNSERVER}\"\nDORMITORY=\"${DORMITORY}\"" > /etc/init.d/pptp-vcgraz
+printf "#!/bin/sh\nLANG=C\nVPNSERVER=\"${VPNSERVER}\"\nDORMITORY=\"${DORMITORY}\"" > /etc/init.d/pptp-vcgraz
 cat >> /etc/init.d/pptp-vcgraz << "EOF"
 # connect to vc-graz via pptp
 case "$1" in