
Linux From Scratch - Version 7.0
306
ip link set ${IFACE} up
fi
fi
else
log_warning_msg "\nInterface ${IFACE} doesn't exist."
fi
fi
IFCONFIG=${file} /lib/services/${SERVICE} ${IFACE} up
else
MSG="\nUnable to process ${file}. Either "
MSG="${MSG}the SERVICE variable was not set "
MSG="${MSG}or the specified service cannot be executed."
log_failure_msg "$MSG"
exit 1
fi
# End /sbin/ifup
D.27. /sbin/ifdown
#!/bin/bash
########################################################################
# Begin /sbin/ifdown
#
# Description : Interface Down
#
#
# Version : LFS 7.0
#
# Notes : the IFCONFIG variable is passed to the scripts found
# in the /lib/services directory, to indicate what file the
# service should source to get interface specifications.
#
########################################################################
RELEASE="7.0"
USAGE="Usage: $0 [ -hV ] [--help] [--version] interface"
VERSTR="LFS ifdown, version ${RELEASE}"
while [ $# -gt 0 ]; do
case "$1" in
--help | -h) help="y"; break ;;
--version | -V) echo "${VERSTR}"; exit 0 ;;
-*) echo "ifup: ${1}: invalid option" >&2
echo "${USAGE}" >& 2
exit 2 ;;
Comentarios a estos manuales