diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-07-23 18:24:11 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-07-23 18:24:11 +0000 |
commit | 2d2ddf507bf1ae2f4cc595b23b8e018398cbe8dd (patch) | |
tree | a63d3b3b1c89018b5419358eed5c2bb0acf1cd92 /main/openrc/hostname.initd | |
parent | e374901731eb35599bd6735de4dd38560e3a79b8 (diff) | |
download | aports-2d2ddf507bf1ae2f4cc595b23b8e018398cbe8dd.tar.bz2 aports-2d2ddf507bf1ae2f4cc595b23b8e018398cbe8dd.tar.xz |
move core/* to main/
added maintainer to several packages as well
Diffstat (limited to 'main/openrc/hostname.initd')
-rw-r--r-- | main/openrc/hostname.initd | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/main/openrc/hostname.initd b/main/openrc/hostname.initd new file mode 100644 index 0000000000..995e4b95d8 --- /dev/null +++ b/main/openrc/hostname.initd @@ -0,0 +1,18 @@ +#!/sbin/runscript + +description="Sets the hostname of the machine." + +depend() { + keyword noprefix +} + +start() { + if [ -f /etc/hostname ] ; then + opts="-F /etc/hostname" + else + opts="localhost" + fi + ebegin "Setting hostname" + hostname $opts + eend $? +} |