MTD 248-645A Manual de usuario Pagina 327

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 347
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 326
Linux From Scratch - Version 7.0
307
*) break ;;
esac
done
if [ -n "$help" ]; then
echo "${VERSTR}"
echo "${USAGE}"
echo
cat << HERE_EOF
ifdown is used to bring down a network interface. The interface
parameter, e.g. eth0 or eth0:2, must match the trailing part of the
interface specifications file, e.g. /etc/sysconfig/ifconfig.eth0:2.
HERE_EOF
exit 0
fi
file=/etc/sysconfig/ifconfig.${1}
# Skip backup files
[ "${file}" = "${file%""~""}" ] || exit 0
. /lib/lsb/init-functions
if [ ! -r "${file}" ]; then
log_warning_msg "${file} is missing or cannot be accessed."
exit 1
fi
. ${file}
if [ "$IFACE" = "" ]; then
log_failure_msg "${file} does not define an interface [IFACE]."
exit 1
fi
# This will run the service script, if SERVICE is set
if [ -n "${SERVICE}" -a -x "/lib/services/${SERVICE}" ]; then
if ip link show ${IFACE} > /dev/null 2>&1; then
IFCONFIG=${file} /lib/services/${SERVICE} ${IFACE} down
else
log_warning_msg "Interface ${1} doesn't exist."
echo_warning
fi
else
MSG="Unable 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
link_status=`ip link show ${IFACE} 2>/dev/null`
if [ -n "${link_status}" ]; then
if [ "$(echo "${link_status}" | grep UP)" != "" ]; then
if [ "$(ip addr show ${IFACE} | grep 'inet ')" != "" ]; then
Vista de pagina 326
1 2 ... 322 323 324 325 326 327 328 329 330 331 332 ... 346 347

Comentarios a estos manuales

Sin comentarios