aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-05-12 15:11:04 +0000
committerRoy Marples <roy@marples.name>2008-05-12 15:11:04 +0000
commitbe8f8d0ac0f75dbfb5b804dfb3725cf842654cae (patch)
treefb4a278cb95e5f8ae9cdbd50bed94718ef40367a
parentd667da8e5c4b3de1f73dd288f88ea8783799735b (diff)
Add the devdb init script.
-rw-r--r--init.d/.gitignore1
-rw-r--r--init.d/Makefile.NetBSD2
-rw-r--r--init.d/bootmisc.in2
-rw-r--r--init.d/devdb.in21
4 files changed, 24 insertions, 2 deletions
diff --git a/init.d/.gitignore b/init.d/.gitignore
index 6c61405f..6daabc3b 100644
--- a/init.d/.gitignore
+++ b/init.d/.gitignore
@@ -38,3 +38,4 @@ mtab
numlock
procfs
termencoding
+devdb
diff --git a/init.d/Makefile.NetBSD b/init.d/Makefile.NetBSD
index 2d1141bd..60fd09c2 100644
--- a/init.d/Makefile.NetBSD
+++ b/init.d/Makefile.NetBSD
@@ -5,7 +5,7 @@ SRCS+= hostid.in moused.in newsyslog.in pf.in rarpd.in rc-enabled.in \
rpcbind.in savecore.in syslogd.in
# These are NetBSD specific
-SRCS+= swap-blk.in ttys.in wscons.in
+SRCS+= devdb.in swap-blk.in ttys.in wscons.in
.SUFFIXES: .BSD.in
.BSD.in:
diff --git a/init.d/bootmisc.in b/init.d/bootmisc.in
index 7a9e22f3..e40fd516 100644
--- a/init.d/bootmisc.in
+++ b/init.d/bootmisc.in
@@ -86,7 +86,7 @@ start()
ebegin "Cleaning /var/run"
for x in $(find /var/run ! -type d ! -name utmp \
- ! -name random-seed \
+ ! -name random-seed ! -name dev.db \
! -name ld-elf.so.hints ! -name ld.so.hints);
do
[ ! -f "${x}" ] && continue
diff --git a/init.d/devdb.in b/init.d/devdb.in
new file mode 100644
index 00000000..a87dbdee
--- /dev/null
+++ b/init.d/devdb.in
@@ -0,0 +1,21 @@
+#!@PREFIX@/sbin/runscript
+# Copyright 2008 Roy Marples <roy@marples.name>
+# All rights reserved. Released under the 2-clause BSD license.
+
+description="Creates the dev database"
+
+depend()
+{
+ need localmount
+}
+
+start()
+{
+ ebegin "Bulding the dev database"
+ if [ /var/run/dev.db -nt /dev ]; then
+ :
+ else
+ dev_mkdb
+ fi
+ eend $?
+}