aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@orbis-terrarum.net>2015-01-19 00:54:39 -0800
committerRobin H. Johnson <robbat2@orbis-terrarum.net>2015-01-19 00:54:39 -0800
commitea4b01b115ba3501073c326099e9c6f89de4c3af (patch)
treeb81c84ff0018831d08df74a036d2b930cc54f23a /sh
parentMerge pull request #5 from dwfreed/master (diff)
parentDo not call exit with a negative value (diff)
downloadnetifrc-ea4b01b115ba3501073c326099e9c6f89de4c3af.tar.gz
netifrc-ea4b01b115ba3501073c326099e9c6f89de4c3af.tar.bz2
netifrc-ea4b01b115ba3501073c326099e9c6f89de4c3af.zip
Merge pull request #6 from floppym/fixes1
Miscellaneous fixes
Diffstat (limited to 'sh')
-rw-r--r--sh/functions.sh4
-rw-r--r--sh/systemd-wrapper.sh.in9
2 files changed, 6 insertions, 7 deletions
diff --git a/sh/functions.sh b/sh/functions.sh
index d907585..34aaa27 100644
--- a/sh/functions.sh
+++ b/sh/functions.sh
@@ -11,7 +11,7 @@ elif [ -f /lib/gentoo/functions.sh ]; then
else
echo "/lib/gentoo/functions.sh not found. Exiting"
- exit -1
+ exit 1
fi
# runscript functions
@@ -120,7 +120,7 @@ get_interface() {
printf ${RC_IFACE};;
*)
eerror "Init system not supported. Aborting"
- exit -1;;
+ exit 1;;
esac
}
diff --git a/sh/systemd-wrapper.sh.in b/sh/systemd-wrapper.sh.in
index d931200..b26f976 100644
--- a/sh/systemd-wrapper.sh.in
+++ b/sh/systemd-wrapper.sh.in
@@ -14,7 +14,7 @@ usage() {
die() {
echo "$@"
- exit -1
+ exit 1
}
while getopts "i:" opt; do
@@ -49,8 +49,7 @@ fi
if [ -f "$INITDIR/${RC_SVCPREFIX}.lo" ]; then
. "$INITDIR/${RC_SVCPREFIX}.lo"
else
- echo "$INITDIR/${RC_SVCPREFIX}.lo : Init file missing or invalid path"
- exit -1
+ die "$INITDIR/${RC_SVCPREFIX}.lo : Init file missing or invalid path"
fi
netifrc_init() {
@@ -58,13 +57,13 @@ netifrc_init() {
mkdir -p "$OPTIONSDIR"
if [ ! -w "$OPTIONSDIR" ]; then
eerror "${OPTIONSDIR} does not exist or is not writeable"
- exit -1;
+ exit 1
fi
# Ensure STATEDIR is present and writeable
mkdir -p "$STATEDIR"
if [ ! -w "$STATEDIR" ]; then
eerror "${STATEDIR} does not exist or is not writeable"
- exit -1;
+ exit 1
fi
}