summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--basefiles.pkg/install1
-rwxr-xr-xbuild7
-rw-r--r--src/etc/hostname1
-rw-r--r--src/etc/init.d/hostname13
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
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