Procházet zdrojové kódy

base-files: sysupgrade stage2: fix losetup detection

If the busybox applet losetup was selected, `command -v` selects that
during sysupgrade. As this applet is in another path and doesn't cover
the '-D' option which is used to make sure user-defined loop devices
are no longer active during sysupgrade.
Detect losetup at the path of the full utility to avoid error messages
in case of the busybox applet being selected.

Reported-by: fda77 <[email protected]>
Signed-off-by: Daniel Golle <[email protected]>
Daniel Golle před 4 roky
rodič
revize
af76e26b55
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      package/base-files/files/lib/upgrade/stage2

+ 1 - 1
package/base-files/files/lib/upgrade/stage2

@@ -33,7 +33,7 @@ supivot() { # <new_root> <old_root>
 }
 
 switch_to_ramfs() {
-	RAMFS_COPY_LOSETUP="$(command -v losetup)"
+	RAMFS_COPY_LOSETUP="$(command -v /usr/sbin/losetup)"
 	RAMFS_COPY_LVM="$(command -v lvm)"
 
 	for binary in \