[openwrt/openwrt] base-files: sysupgrade stage2: fix losetup detection
LEDE Commits
lede-commits at lists.infradead.org
Tue Aug 3 10:29:54 PDT 2021
dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/af76e26b557270307e05be168c3b9463886306f1
commit af76e26b557270307e05be168c3b9463886306f1
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Mon Aug 2 20:51:58 2021 +0200
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 <fda77 at users.noreply.github.com>
Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
package/base-files/files/lib/upgrade/stage2 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/base-files/files/lib/upgrade/stage2 b/package/base-files/files/lib/upgrade/stage2
index 13c3622f38..30ad19f7f1 100755
--- a/package/base-files/files/lib/upgrade/stage2
+++ b/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 \
More information about the lede-commits
mailing list