#!/bin/sh # ------- # netconfig-client net script to download netconfig data # (c) 2008 Luis Garcia # -------- set -e # PATH y variables PATH="/sbin:/bin:/usr/sbin:/usr/bin" LLX_GETVAR="/usr/sbin/llxcfg-showvars" VAR_LIST="LLXCFG_IFACE" NETCONFIG_WSN="/usr/sbin/llxcfg-netconfig-client" # read vars and set default values [ -x ${NETCONFIG_WSN} ] || exit 0 [ -x ${LLX_GETVAR} ] && eval `${LLX_GETVAR} ${VAR_LIST}` [ "${LLXCFG_IFACE}" ] || exit 0 # check network interface [ "$IFACE" = "$LLXCFG_IFACE" ] || exit 0 # do the right thing ... case $1 in pre-up|post-down) # ${NETCONFIG_WSN} remove-data || true ;; up) ${NETCONFIG_WSN} get-data || true ;; esac exit 0