summaryrefslogtreecommitdiff
path: root/www/mini_httpd/files/patch-scripts_mini__httpd.sh
blob: 6b1a5e0aa3db8103a6f062a3d7631d971d616562 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- scripts/mini_httpd.sh.orig	2016-06-18 20:06:02 UTC
+++ scripts/mini_httpd.sh
@@ -22,6 +22,7 @@
 name='mini_httpd'
 rcvar='mini_httpd_enable'
 start_precmd='mini_httpd_precmd'
+stop_postcmd='mini_httpd_poststop'
 mini_httpd_enable_defval='NO'
 
 load_rc_config "$name"
@@ -35,6 +36,13 @@ mini_httpd_precmd ()
 		mount -t devfs devfs "$mini_httpd_devfs"
 		devfs -m "$mini_httpd_devfs" rule -s 1 applyset
 		devfs -m "$mini_httpd_devfs" rule -s 2 applyset
+	fi
+}
+
+mini_httpd_poststop ()
+{
+	if [ -n "$mini_httpd_devfs" -a "$mini_httpd_devfs" != "/dev" ]; then
+		umount "$mini_httpd_devfs"
 	fi
 }