Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Jun 2021 00:50:34 GMT
From:      Craig Leres <leres@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 6d19e625a2f2 - main - www/mini_httpd: umount devfs when stopping the service
Message-ID:  <202106120050.15C0oYdv070771@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by leres:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6d19e625a2f26f21a76241b86cb5243216ea2987

commit 6d19e625a2f26f21a76241b86cb5243216ea2987
Author:     Craig Leres <leres@FreeBSD.org>
AuthorDate: 2021-06-12 00:46:12 +0000
Commit:     Craig Leres <leres@FreeBSD.org>
CommitDate: 2021-06-12 00:46:12 +0000

    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
---
 www/mini_httpd/Makefile                           |  2 +-
 www/mini_httpd/files/patch-scripts_mini__httpd.sh | 24 +++++++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/www/mini_httpd/Makefile b/www/mini_httpd/Makefile
index 1cdcf27d41fb..9d74fe06dfcf 100644
--- a/www/mini_httpd/Makefile
+++ b/www/mini_httpd/Makefile
@@ -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/
 
diff --git a/www/mini_httpd/files/patch-scripts_mini__httpd.sh b/www/mini_httpd/files/patch-scripts_mini__httpd.sh
new file mode 100644
index 000000000000..6b1a5e0aa3db
--- /dev/null
+++ b/www/mini_httpd/files/patch-scripts_mini__httpd.sh
@@ -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
+ }
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106120050.15C0oYdv070771>