summaryrefslogtreecommitdiffstats
path: root/src/netcfg
diff options
context:
space:
mode:
authorJames Rayner <james@archlinux.org>2009-02-16 11:09:06 +0100
committerJames Rayner <james@archlinux.org>2009-02-16 11:09:06 +0100
commit371cd06f36328ba0ddb75fe64102e8fc232a7fd3 (patch)
tree1584bb6d4eafe2cd2ee257d9c9b1d3ef1cc67a58 /src/netcfg
parentcfcf836b94c5f3b520f0022942b1932c566eefdb (diff)
downloadnetctl-371cd06f36328ba0ddb75fe64102e8fc232a7fd3.tar.gz
netctl-371cd06f36328ba0ddb75fe64102e8fc232a7fd3.tar.xz
various fixes, and new quirk 'noacheck'
Diffstat (limited to 'src/netcfg')
-rw-r--r--src/netcfg13
1 files changed, 5 insertions, 8 deletions
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;;