# Read network settings
network_settings_read
-function cli_settings() {
+cli_settings() {
if cli_help_requested $@; then
cli_show_man network-settings
exit ${EXIT_OK}
fi
}
-function cli_device() {
+cli_device() {
if cli_help_requested $@; then
cli_show_man network-device
exit ${EXIT_OK}
return ${EXIT_OK}
}
-function cli_device_status() {
+cli_device_status() {
local device="${1}"
assert isset device
LOG_DISABLE_STDOUT=${log_disable_stdout}
}
-function cli_device_status_serial() {
+cli_device_status_serial() {
local device=${1}
assert device_is_serial ${device}
cli_space
}
-function cli_device_status_phy() {
+cli_device_status_phy() {
local phy="${1}"
assert phy_exists "${phy}"
return ${EXIT_OK}
}
-function cli_device_discover() {
+cli_device_discover() {
local device=${1}
shift
[ "${up}" = "1" ] || device_set_down ${device}
}
-function cli_device_serial_unlock() {
+cli_device_serial_unlock() {
if cli_help_requested $@; then
cli_show_man network-device
exit ${EXIT_OK}
exit $?
}
-function cli_device_send_ussd_command() {
+cli_device_send_ussd_command() {
local device="${1}"
assert isset device
shift
exit $?
}
-function cli_device_monitor() {
+cli_device_monitor() {
local device="${1}"
assert isset device
exit $?
}
-function cli_device_list() {
+cli_device_list() {
local device
for device in $(device_list); do
cli_device_status "${device}"
exit ${EXIT_OK}
}
-function cli_hostname() {
+cli_hostname() {
if cli_help_requested $@; then
cli_show_man network
exit ${EXIT_OK}
exit ${EXIT_OK}
}
-function cli_port() {
+cli_port() {
if cli_help_requested $@; then
cli_show_man network-port
exit ${EXIT_OK}
fi
}
-function cli_zone() {
+cli_zone() {
if cli_help_requested $@; then
cli_show_man network-zone
exit ${EXIT_OK}
# Removes a zone either immediately, if it is currently down,
# or adds a tag that the removal will be done when the zone
# is brought down the next time.
-function cli_zone_destroy() {
+cli_zone_destroy() {
if cli_help_requested $@; then
cli_show_man network-zone
exit ${EXIT_OK}
exit ${EXIT_OK}
}
-function cli_zone_port() {
+cli_zone_port() {
if cli_help_requested $@; then
cli_show_man network-zone-port
exit ${EXIT_OK}
exit ${EXIT_OK}
}
-function cli_list_hooks() {
+cli_list_hooks() {
local type=${1}
shift
done | sort -u
}
-function cli_route() {
+cli_route() {
if cli_help_requested $@; then
cli_show_man network-route
exit ${EXIT_OK}
exit ${EXIT_OK}
}
-function cli_dhcpd() {
+cli_dhcpd() {
local proto=${1}
shift
exit ${EXIT_OK}
}
-function cli_dhcpd_show() {
+cli_dhcpd_show() {
local proto=${1}
assert isset proto
fi
}
-function cli_dhcpd_subnet() {
+cli_dhcpd_subnet() {
local proto=${1}
shift
exit ${EXIT_OK}
}
-function cli_dhcpd_subnet_range() {
+cli_dhcpd_subnet_range() {
local proto=${1}
assert isset proto
shift
esac
}
-function cli_dhcpd_subnet_show() {
+cli_dhcpd_subnet_show() {
local proto=${1}
assert isset proto
cli_space
}
-function cli_dhcpd_subnet_options() {
+cli_dhcpd_subnet_options() {
local proto=${1}
assert isset proto
shift
done
}
-function cli_start() {
+cli_start() {
if cli_help_requested $@; then
cli_show_man network
exit ${EXIT_OK}
wait # until everything is settled
}
-function cli_stop() {
+cli_stop() {
if cli_help_requested $@; then
cli_show_man network
exit ${EXIT_OK}
wait # until everything is settled
}
-function cli_restart() {
+cli_restart() {
if cli_help_requested $@; then
cli_show_man network
exit ${EXIT_OK}
cli_start $@
}
-function cli_status() {
+cli_status() {
if cli_help_requested $@; then
cli_show_man network
exit ${EXIT_OK}
LOG_DISABLE_STDOUT=${log_disable_stdout}
}
-function cli_reset() {
+cli_reset() {
if cli_help_requested $@; then
cli_show_man network
exit ${EXIT_OK}
# Help function: will show the default man page to the user.
# Optionally, there are two arguments taken, the type of hook
# and which hook should be shown.
-function cli_help() {
+cli_help() {
local type=${1}
local what=${2}
hook_exec ${type} ${what} help
}
-function cli_dns_server() {
+cli_dns_server() {
if cli_help_requested $@; then
cli_show_man network-dns-server
exit ${EXIT_OK}
exit ${EXIT_OK}
}
-function cli_raw() {
+cli_raw() {
local cmd="${1}"
assert isset cmd
shift