View Single Post
Posts: 125 | Thanked: 1 time | Joined on Aug 2006
#10
Why would I get a Segmentaion fault on this portion

Code:
#!/bin/sh
# use gainroot to become root and relaunch itself
if [ `id -u` != 0 ] ; then
#if not already root, call itself as root
        exec sudo gainroot <<EOF
exec $0 $*
EOF
        exit $?