diff options
Diffstat (limited to 'target/device/valka/target_skeleton/etc/rc.d/03.hostname')
-rwxr-xr-x | target/device/valka/target_skeleton/etc/rc.d/03.hostname | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/target/device/valka/target_skeleton/etc/rc.d/03.hostname b/target/device/valka/target_skeleton/etc/rc.d/03.hostname new file mode 100755 index 000000000..5cbae3f78 --- /dev/null +++ b/target/device/valka/target_skeleton/etc/rc.d/03.hostname @@ -0,0 +1,25 @@ +#!/bin/ash +. /etc/rc.subr + +start() { + echo -n " * Settings hostname: " + if [ ! -x ${hostname_program} ]; then + log_error "Missing 'hostname' program (${hostname_program})" + echo "Failed" + return 1 + fi + + if ${hostname_program} ${hostname}; then + echo "'${hostname}'" + echo ${hostname} > /etc/hostname + else + echo "Failed" + return 1 + fi +} + +stop() { + return 0 +} + +rc_run_command "$1" |