1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-19 00:13:33 +00:00

www/mini_httpd: umount devfs when stopping the service

Update the rc.d scripts to unmount devfs when the mini_httpd_devfs
rc.d option is used.

PR:		256462
Reported by:	takefu@airport.fm
This commit is contained in:
Craig Leres 2021-06-11 17:46:12 -07:00
parent f5f38333a6
commit 6d19e625a2
2 changed files with 25 additions and 1 deletions

View File

@ -2,7 +2,7 @@
PORTNAME= mini_httpd
PORTVERSION= 1.30
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= www
MASTER_SITES= https://www.acme.com/software/mini_httpd/

View File

@ -0,0 +1,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
}