ifup, ifdown: display an error message when executed without any argument
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
parent
83dce52968
commit
60535caa3b
@ -1,13 +1,16 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2003-2012 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
# Copyright (c) 2003-2009 by Davide Madrisan <davide.madrisan@gmail.com>
|
||||
# Copyright (c) 2003-2009,2013 by Davide Madrisan <davide.madrisan@gmail.com>
|
||||
|
||||
. /etc/sysconfig/rc
|
||||
. $rc_functions
|
||||
|
||||
DEVICE=${1}
|
||||
|
||||
[ "${DEVICE}" ] || exit 1
|
||||
if [ -z "$DEVICE" ]; then
|
||||
echo "Usage: ifdown <device name>" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ "$NM_CONTROLLED" = "0" ] || exit 0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user