# 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 Mai 27 15:12:52 CEST 2006 [mika]
################################################################################
################################################################################
# by Wolfgang Scheicher.
################################################################################
-LANG=C
-LC_ALL=C
+export LANG=C
+export LC_ALL=C
-if [ "$UID" != 0 ]; then
+if [ $(id -ru) -ne 0 ] ; then
sudo $0
exit
fi
# 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