iopsys-feed/dslmngr/files/common/etc/init.d/dsl
Erik Karlsson 9cf5186546 Remove service_stop use
service_stop is a legacy function and it should never be used with
procd services which are automatically stopped by /etc/rc.common

Also remove unnecessary boot() which just runs the "start" function.
2023-04-18 05:59:55 +00:00

45 lines
631 B
Bash
Executable file

#!/bin/sh /etc/rc.common
. /lib/functions.sh
include /lib/dsl
START=20
USE_PROCD=1
DSLMNGR=$(which dslmngr)
start_service() {
[ -n "$DSLMNGR" ] && {
procd_open_instance
procd_set_param command "$DSLMNGR"
procd_set_param respawn
procd_close_instance
}
xdsl_configure
xtm_create_devices
}
stop_service() {
xtm_remove_devices
xdsl_stop
}
boot() {
local HASADSL="$(db -q get hw.board.hasAdsl)"
local HASVDSL="$(db -q get hw.board.hasVdsl)"
[ "$HASADSL" == "1" -o "$HASVDSL" == "1" ] || return
xdsl_init
start
}
reload_service() {
stop
start
}
service_triggers() {
procd_add_reload_trigger dsl
}