aboutsummaryrefslogtreecommitdiff
path: root/init.d.BSD/hostid
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-01-11 12:13:46 +0000
committerRoy Marples <roy@marples.name>2008-01-11 12:13:46 +0000
commit3bf49a9bd19d5bbcf6976dd42b4f87f1b173e287 (patch)
tree8b4d6121f0d4b921566eeec2844c9bf76131de78 /init.d.BSD/hostid
parent1f4422c72f968405a0b8bf56d4f9c3b619b1b80d (diff)
Adopt a more C style for scripts and remove vim settings.
Diffstat (limited to 'init.d.BSD/hostid')
-rw-r--r--init.d.BSD/hostid12
1 files changed, 8 insertions, 4 deletions
diff --git a/init.d.BSD/hostid b/init.d.BSD/hostid
index 598ded31..f97609a0 100644
--- a/init.d.BSD/hostid
+++ b/init.d.BSD/hostid
@@ -5,12 +5,14 @@
extra_commands="reset"
hostid_file=${hostid_file:-/etc/hostid}
-depend() {
+depend()
+{
need checkroot
before devd net
}
-_set() {
+_set()
+{
local id=0
if [ -n "$1" ]; then
@@ -33,7 +35,8 @@ _set() {
# First we check to see if there is a system UUID
# If so then we use that and erase the hostid file,
# otherwise we generate a random UUID.
-reset() {
+reset()
+{
local uuid=$(kenv smbios.system.uuid 2>/dev/null)
local x="[0-9a-f]"
local y="${x}${x}${x}${x}"
@@ -68,6 +71,7 @@ start()
fi
}
-stop() {
+stop()
+{
_set
}