diff options
author | P. J. McDermott <pjm@nac.net> | 2012-04-29 22:16:59 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2012-04-29 22:16:59 (EDT) |
commit | d28640d44bd6bdcdf3df36e57e9845233dbb879d (patch) | |
tree | 119d0638db4143660055e4b75bac103e7f17af72 | |
parent | 9ea6d8fb188c6d001c50d3de449d09351afd54ca (diff) |
Set hostname.
-rw-r--r-- | basefiles.pkg/install | 1 | ||||
-rwxr-xr-x | build | 7 | ||||
-rw-r--r-- | src/etc/hostname | 1 | ||||
-rw-r--r-- | src/etc/init.d/hostname | 13 |
4 files changed, 19 insertions, 3 deletions
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 @@ -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 |