summaryrefslogtreecommitdiff
path: root/fw/lib/svc
diff options
context:
space:
mode:
Diffstat (limited to 'fw/lib/svc')
-rw-r--r--fw/lib/svc/fw.ether01
-rw-r--r--fw/lib/svc/mntfw19
2 files changed, 20 insertions, 0 deletions
diff --git a/fw/lib/svc/fw.ether0 b/fw/lib/svc/fw.ether0
index 627b1d3..33f2a2d 100644
--- a/fw/lib/svc/fw.ether0
+++ b/fw/lib/svc/fw.ether0
@@ -37,6 +37,7 @@ svc=fw.ether0
args=10.0.2.2
args=/lib/fw/host.ndb
needs=ipconfig
+ needs=mntfw
ready=srv:fw.ether0
restart=always
enable=no
diff --git a/fw/lib/svc/mntfw b/fw/lib/svc/mntfw
new file mode 100644
index 0000000..62eb2e5
--- /dev/null
+++ b/fw/lib/svc/mntfw
@@ -0,0 +1,19 @@
+#
+# The control directories fw mounts on.
+#
+# mount(2) needs its mount point to exist, and the mntgen serving /mnt
+# only makes names one level deep -- /mnt/fw appears by itself, but
+# /mnt/fw/ether0 does not, and that is what fw is told to mount on. So
+# a second mntgen, over /mnt/fw, and every fw needs it.
+#
+# It is a file server: it posts its name and the process that started it
+# exits, so what is watched is the /srv name.
+#
+svc=mntfw
+ exec=/bin/mntgen
+ args=-s
+ args=mntfw
+ args=/mnt/fw
+ ready=srv:mntfw
+ restart=always
+ enable=yes