kumquat-buildroot/target/device/valka/target_skeleton/etc/rc.d/03.hostname
2008-03-06 18:59:14 +00:00

26 lines
387 B
Bash
Executable File

#!/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"