From d28640d44bd6bdcdf3df36e57e9845233dbb879d Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 29 Apr 2012 22:16:59 -0400 Subject: Set hostname. --- diff --git a/basefiles.pkg/install b/basefiles.pkg/install index 65e0e68..6d6add5 100644 --- a/basefiles.pkg/install +++ b/basefiles.pkg/install @@ -2,6 +2,7 @@ /boot /dev /etc/group +/etc/hostname /etc/issue /etc/motd /etc/opt diff --git a/build b/build index 3ac7448..7306ecd 100755 --- a/build +++ b/build @@ -43,9 +43,10 @@ basefiles.buildstamp: ln -s ../init.d/sysfs etc/rc.d/S01sysfs && \ ln -s ../init.d/mdev etc/rc.d/S02mdev && \ ln -s ../init.d/mountall etc/rc.d/S03mountall && \ - ln -s ../init.d/networking etc/rc.d/S04networking && \ - ln -s ../init.d/syslog etc/rc.d/S05syslog && \ - ln -s ../init.d/telnetd etc/rc.d/S06telnetd + ln -s ../init.d/hostname etc/rc.d/S04hostname && \ + ln -s ../init.d/networking etc/rc.d/S05networking && \ + ln -s ../init.d/syslog etc/rc.d/S06syslog && \ + ln -s ../init.d/telnetd etc/rc.d/S07telnetd cd dest/etc/network && \ mkdir if-down.d if-post-down.d if-pre-up.d if-up.d oh-installfiles $(PKGS) diff --git a/src/etc/hostname b/src/etc/hostname new file mode 100644 index 0000000..ea4c381 --- /dev/null +++ b/src/etc/hostname @@ -0,0 +1 @@ +rcstereo diff --git a/src/etc/init.d/hostname b/src/etc/init.d/hostname new file mode 100644 index 0000000..aec1102 --- /dev/null +++ b/src/etc/init.d/hostname @@ -0,0 +1,13 @@ +#!/bin/sh + +case "${1}" in + start) + printf 'Setting hostname... ' + [ -f /etc/hostname ] && hostname -F /etc/hostname || hostname none + printf 'done.\n' + ;; + *) + printf 'Usage: %s start\n' "${0}" >&2 + exit 1 + ;; +esac -- cgit v0.9.1