Skip to contentSkip to conversation

dmsquash-live: do not hardcode path to mount(8) in generated hook.

PATCH In review Juan RP 2 participants 2 messages May 28, 2012 – May 29, 2012 1 message not in the archive

lore
Share & tools
lore

Juan RP

author
#0 lore raw

PATCH 2/2 dmsquash-live: do not hardcode path to mount(8) in generated hook.

In some cases (at least in mine) mount(8) is in /usr/bin/mount and not in /bin/mount as dmsquash-live-root.sh expects. PATH is set to /usr/bin:/usr/sbin:/sbin:/bin in that script anyway.

---
 modules.d/90dmsquash-live/dmsquash-live-root.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
modules.d/90dmsquash-live/dmsquash-live-root.sh +1 -1
index fdbd6f5..990a55b 100755
@@ -204,7 +204,7 @@ if [ -b "$BASE_LOOPDEV" ]; then
     ln -s $BASE_LOOPDEV /run/initramfs/live-baseloop
 fi
 ln -s /dev/mapper/live-rw /dev/root
-printf '/bin/mount %s /dev/mapper/live-rw %s\n' "$ROOTFLAGS" "$NEWROOT" > $hookdir/mount/01-$$-live.sh
+printf 'mount %s /dev/mapper/live-rw %s\n' "$ROOTFLAGS" "$NEWROOT" > $hookdir/mount/01-$$-live.sh
 
 need_shutdown
 
Signature · 1 line
1.7.10.2

A message that is not in the archive (sent off-list or not yet received): 20120528161728.3425f35f.xtraeme-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#2 lore raw

Am 28.05.2012 16:17, schrieb Juan RP:

Quoted 13 lines

In some cases (at least in mine) mount(8) is in /usr/bin/mount and not in /bin/mount as dmsquash-live-root.sh expects. PATH is set to /usr/bin:/usr/sbin:/sbin:/bin in that script anyway.

---
 modules.d/90dmsquash-live/dmsquash-live-root.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
modules.d/90dmsquash-live/dmsquash-live-root.sh +0 -0
index fdbd6f5..990a55b 100755

modules.d/90dmsquash-live/dmsquash-live-root.sh if [ -b "$BASE_LOOPDEV" ]; then · line 210

Quoted 8 lines
modules.d/90dmsquash-live/dmsquash-live-root.sh +1 -1
@@ -204,7 +204,7 @@ if [ -b "$BASE_LOOPDEV" ]; then
     ln -s $BASE_LOOPDEV /run/initramfs/live-baseloop
 fi
 ln -s /dev/mapper/live-rw /dev/root
-printf '/bin/mount %s /dev/mapper/live-rw %s\n' "$ROOTFLAGS" "$NEWROOT" > $hookdir/mount/01-$$-live.sh
+printf 'mount %s /dev/mapper/live-rw %s\n' "$ROOTFLAGS" "$NEWROOT" > $hookdir/mount/01-$$-live.sh
 
 need_shutdown
 

Thanks!