]> git.ipfire.org Git - network.git/commitdiff
network: Remove some unneeded functions.
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 10 Jul 2010 08:34:04 +0000 (10:34 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 10 Jul 2010 08:34:04 +0000 (10:34 +0200)
functions.device

index 54e4d6e64e8e53285fdb5bf86b25b439e9850f2f..cc1bba807ced7c4f058f3b76268e87c4540b5e9d 100644 (file)
@@ -776,105 +776,6 @@ function device_has_ipv6() {
        ip addr show ${device} | grep -q "inet6 ${addr}"
 }
 
-function device_config_list() {
-       local device
-       for device in ${CONFIG_DIR}/devices/*; do
-               device=$(basename ${device})
-               if device_config_exists ${device}; then
-                       echo "${device}"
-               fi
-       done
-}
-
-function device_config_exists() {
-       local device=${1}
-
-       [ -e "${CONFIG_DIR}/devices/${device}" ]
-}
-
-function device_config_write() {
-       local device=${1}
-       shift
-
-       config_write ${CONFIG_DIR}/devices/${device} $@
-}
-
-function device_config_read() {
-       local device=${1}
-
-       config_read ${CONFIG_DIR}/devices/${device}
-}
-
-function device_create() {
-       local hook=${1}
-       shift
-
-       if ! hook_exists device ${hook}; then
-               error "Hook '${hook}' does not exist."
-               return ${EXIT_ERROR}
-       fi
-
-       hook_exec device ${hook} create $@
-}
-
-# XXX to be fixed
-function device_up() {
-       local device=${1}
-       shift
-
-       if ! device_config_exists ${device}; then
-               error "Device '${device}' does not exist."
-               return ${EXIT_ERROR}
-       fi
-
-       local hook=$(config_get_hook ${CONFIG_DIR}/devices/${device})
-
-       if ! hook_exists device ${hook}; then
-               error "Hook '${hook}' does not exist."
-               return ${EXIT_ERROR}
-       fi
-
-       hook_exec device ${hook} up ${device} $@
-}
-
-# XXX to be fixed
-function device_down() {
-       local device=${1}
-       shift
-
-       if ! device_config_exists ${device}; then
-                error "Device '${device}' does not exist."
-                return ${EXIT_ERROR}
-        fi
-
-       local hook=$(config_get_hook ${CONFIG_DIR}/devices/${device})
-
-       if ! hook_exists device ${hook}; then
-               error "Hook '${hook}' does not exist."
-               return ${EXIT_ERROR}
-       fi
-
-       hook_exec device ${hook} down ${device} $@
-}
-
-function device_print() {
-       local device=${1}
-       local type=$(device_get_type ${device})
-
-       echo "${device}"
-       printf "${DEVICE_PRINT_LINE1}" "Type:" "${type}"
-
-       #device_config_exists ${device}
-       #local has_config=$?
-
-       # XXX need something is_function() method here
-       if [ -n "$(type -t ${type}_device_print)" ]; then
-               ${type}_device_print ${device}
-       fi
-
-       echo # Empty line
-}
-
 function __device_get_file() {
        local device=${1}
        local file=${2}