From 371cd06f36328ba0ddb75fe64102e8fc232a7fd3 Mon Sep 17 00:00:00 2001 From: James Rayner Date: Mon, 16 Feb 2009 21:09:06 +1100 Subject: various fixes, and new quirk 'noacheck' --- src/netcfg | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/netcfg') diff --git a/src/netcfg b/src/netcfg index 86a4e9c..816c043 100644 --- a/src/netcfg +++ b/src/netcfg @@ -28,10 +28,7 @@ usage() echo "-v, --version Output version information and exit" } -if [ "`id -u`" != "0" ]; then - err "This script should be run as root." - exit 1 -fi +# TODO: Re-add ROOT check and rewrite with getopts from BashFAQ case $1 in --version|-v) @@ -42,10 +39,10 @@ case $1 in CHECK="YES"; profile_up $2;; clean) - rm /var/run/network/interfaces/* - rm /var/run/network/profiles/* - killall wpa_supplicant - killall dhcpcd + rm /var/run/network/interfaces/* 2> /dev/null + rm /var/run/network/profiles/* 2> /dev/null + killall wpa_supplicant 2> /dev/null + killall dhcpcd 2> /dev/null ;; -d|down) profile_down $2;; -- cgit v1.2.3-24-g4f1b