public inbox for ipfire-scm@lists.ipfire.org
 help / color / mirror / Atom feed
* [git.ipfire.org] IPFire 2.x development tree branch, next, updated. f3d26496ac972cac1f62f7f6229a1c2bf597bff9
@ 2023-09-17 12:26 Arne Fitzenreiter
  0 siblings, 0 replies; only message in thread
From: Arne Fitzenreiter @ 2023-09-17 12:26 UTC (permalink / raw)
  To: ipfire-scm

[-- Attachment #1: Type: text/plain, Size: 5605 bytes --]

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".

The branch, next has been updated
       via  f3d26496ac972cac1f62f7f6229a1c2bf597bff9 (commit)
       via  d1b4c380ef4d64e1515d7ac6654167959fe472b5 (commit)
       via  7c9f5f9882af2203e0445e1d9044f4df0bc00265 (commit)
       via  fe2fd95a9ef320391a09b91304a97bc68bc0573b (commit)
       via  b0fcbe414fc561187aedfd618149b73ac3c80ef8 (commit)
       via  3a95423680a29b18b43cbb6e30cca2c691d9a638 (commit)
      from  13b04e6998a4be3ed0c54221b8918b967f0e5395 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f3d26496ac972cac1f62f7f6229a1c2bf597bff9
Merge: 13b04e699 d1b4c380e
Author: Arne Fitzenreiter <arne_f(a)ipfire.org>
Date:   Sun Sep 17 12:20:33 2023 +0000

    Merge remote-tracking branch 'origin/master' into next
    
    Signed-off-by: Arne Fitzenreiter <arne_f(a)ipfire.org>

-----------------------------------------------------------------------

Summary of changes:
 config/extrahd/extrahd.pl                    | 36 +++++++++++++++++++++-------
 config/rootfiles/common/udev                 |  1 +
 config/rootfiles/core/180/filelists/files    |  2 ++
 config/rootfiles/oldcore/179/filelists/files |  1 +
 config/udev/61-extrahd.rules                 |  1 +
 lfs/udev                                     |  4 ++++
 6 files changed, 37 insertions(+), 8 deletions(-)
 create mode 100644 config/udev/61-extrahd.rules

Difference in files:
diff --git a/config/extrahd/extrahd.pl b/config/extrahd/extrahd.pl
index 145a2a43a..cc85228d5 100644
--- a/config/extrahd/extrahd.pl
+++ b/config/extrahd/extrahd.pl
@@ -35,10 +35,20 @@ extrahd_mount() {
 	local failed=0
 
 	while IFS=';' read -r device filesystem mountpoint rest; do
-		# Filter by mountpoint if set
-		if [ -n "${_mountpoint}" ] && [ "${mountpoint}" != "${_mountpoint}" ]; then
-			continue
-		fi
+		# Filter by UUID or mountpoint
+		case "${_mountpoint}" in
+			UUID=*)
+				if [ "${device}" != "${_mountpoint}" ]; then
+					continue
+				fi
+				;;
+
+			/*)
+				if [ -n "${_mountpoint}" ] && [ "${mountpoint}" != "${_mountpoint}" ]; then
+					continue
+				fi
+				;;
+		esac
 
 		# Check that the mountpoint starts with a slash
 		if [ "${mountpoint:0:1}" != "/" ]; then
@@ -75,10 +85,20 @@ extrahd_umount() {
 	local failed=0
 
 	while IFS=';' read -r device filesystem mountpoint rest; do
-		# Filter by mountpoint if set
-		if [ -n "${_mountpoint}" ] && [ "${mountpoint}" != "${_mountpoint}" ]; then
-			continue
-		fi
+		# Filter by UUID or mountpoint
+		case "${_mountpoint}" in
+			UUID=*)
+				if [ "${device}" != "${_mountpoint}" ]; then
+					continue
+				fi
+				;;
+
+			/*)
+				if [ -n "${_mountpoint}" ] && [ "${mountpoint}" != "${_mountpoint}" ]; then
+					continue
+				fi
+				;;
+		esac
 
 		# Do not try to umount if nothing is mounted
 		if ! mountpoint "${mountpoint}" &>/dev/null; then
diff --git a/config/rootfiles/common/udev b/config/rootfiles/common/udev
index e5c9bd01f..876ae0c5a 100644
--- a/config/rootfiles/common/udev
+++ b/config/rootfiles/common/udev
@@ -70,6 +70,7 @@ lib/udev/rules.d/60-persistent-storage.rules
 lib/udev/rules.d/60-persistent-v4l.rules
 lib/udev/rules.d/60-sensor.rules
 lib/udev/rules.d/60-serial.rules
+lib/udev/rules.d/61-extrahd.rules
 lib/udev/rules.d/64-btrfs.rules
 lib/udev/rules.d/70-camera.rules
 lib/udev/rules.d/70-joystick.rules
diff --git a/config/rootfiles/core/180/filelists/files b/config/rootfiles/core/180/filelists/files
index 616b2d24a..8b44a36b1 100644
--- a/config/rootfiles/core/180/filelists/files
+++ b/config/rootfiles/core/180/filelists/files
@@ -4,6 +4,8 @@ etc/rc.d/init.d/networking/any
 etc/rc.d/init.d/networking/functions.network
 etc/rc.d/init.d/networking/red
 etc/rc.d/init.d/networking/red.up/99-pakfire-update
+lib/udev/rules.d/61-extrahd.rules
 opt/pakfire/lib/functions.pl
+srv/web/ipfire/cgi-bin/extrahd.cgi
 srv/web/ipfire/cgi-bin/index.cgi
 var/ipfire/main/manualpages
diff --git a/config/rootfiles/oldcore/179/filelists/files b/config/rootfiles/oldcore/179/filelists/files
index 56a00e58f..46fa9c083 100644
--- a/config/rootfiles/oldcore/179/filelists/files
+++ b/config/rootfiles/oldcore/179/filelists/files
@@ -1,4 +1,5 @@
 etc/rc.d/init.d/networking/red
+lib/udev/rules.d/61-extrahd.rules
 srv/web/ipfire/cgi-bin/extrahd.cgi
 srv/web/ipfire/cgi-bin/fwhosts.cgi
 srv/web/ipfire/cgi-bin/ovpnmain.cgi
diff --git a/config/udev/61-extrahd.rules b/config/udev/61-extrahd.rules
new file mode 100644
index 000000000..114f2d665
--- /dev/null
+++ b/config/udev/61-extrahd.rules
@@ -0,0 +1 @@
+ACTION=="add", SUBSYSTEM=="block", RUN+="/var/ipfire/extrahd/bin/extrahd.pl udev-event"
diff --git a/lfs/udev b/lfs/udev
index 300c77f7d..9cb310875 100644
--- a/lfs/udev
+++ b/lfs/udev
@@ -123,6 +123,10 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
 	install -v -m 644 $(DIR_SRC)/config/udev/60-net.rules \
 		/lib/udev/rules.d
 
+	# Install ExtraHD rules
+	install -v -m 644 $(DIR_SRC)/config/udev/61-extrahd.rules \
+		/lib/udev/rules.d
+
 	# Install AQM rules
 	install -v -m 644 $(DIR_SRC)/config/udev/99-aqm.rules \
 		/lib/udev/rules.d


hooks/post-receive
--
IPFire 2.x development tree

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-09-17 12:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-17 12:26 [git.ipfire.org] IPFire 2.x development tree branch, next, updated. f3d26496ac972cac1f62f7f6229a1c2bf597bff9 Arne Fitzenreiter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox