[arch-releng] [PATCH 1/2] [archiso] Check if /run/archiso/bootmnt is a mountpoint.

Gerardo Exequiel Pozzi vmlinuz386 at yahoo.com.ar
Tue Nov 22 00:47:34 EST 2011


In this way allow to mount /run/archiso/bootmnt from another hook,
but still use the logic from the main mount_hook, skipping only this mount.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386 at yahoo.com.ar>
---
 archiso/hooks/archiso   |    2 +-
 archiso/install/archiso |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/archiso/hooks/archiso b/archiso/hooks/archiso
index f446bd2..2ea6f47 100644
--- a/archiso/hooks/archiso
+++ b/archiso/hooks/archiso
@@ -167,7 +167,7 @@ archiso_mount_handler() {
 
     _init_loop_dev
 
-    _mnt_dev "${archisodevice}" "/run/archiso/bootmnt" "-r"
+    mountpoint -q "/run/archiso/bootmnt" || _mnt_dev "${archisodevice}" "/run/archiso/bootmnt" "-r"
 
     if [[ ! -f "${aitab}" ]]; then
         echo "ERROR: '${aitab}' file does not exist."
diff --git a/archiso/install/archiso b/archiso/install/archiso
index 0bb0d0f..75b7706 100644
--- a/archiso/install/archiso
+++ b/archiso/install/archiso
@@ -8,6 +8,7 @@ build ()
     add_binary /lib/udev/cdrom_id
     add_binary /sbin/blockdev
     add_binary /sbin/dmsetup
+    add_binary /bin/mountpoint
 
     add_file /lib/udev/rules.d/60-cdrom_id.rules
     add_file /lib/udev/rules.d/10-dm.rules
-- 
1.7.7.3



More information about the arch-releng mailing list