# 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: Fre Aug 11 11:41:22 CEST 2006 [mika]
################################################################################
################################################################################
# by Wolfgang Scheicher.
################################################################################
-LANG=C
+export LANG=C
-if [ "$UID" != 0 ]; then
-# sudo $0
-# exit
-echo foo
+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
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"