aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/sbin/sysupgrade
diff options
context:
space:
mode:
authorRobert Marko <robimarko@gmail.com>2020-12-20 18:02:53 +0100
committerDaniel Golle <daniel@makrotopia.org>2020-12-20 17:14:56 +0000
commit20d847d1338f716fc9f143f633b6f79ba6017b5c (patch)
treec941cc20705c4aa9539b957416fff4195a050452 /package/base-files/files/sbin/sysupgrade
parent7a181a65f2e5d19e379cebbb980aa2f2985709e2 (diff)
downloadupstream-20d847d1338f716fc9f143f633b6f79ba6017b5c.tar.gz
upstream-20d847d1338f716fc9f143f633b6f79ba6017b5c.tar.bz2
upstream-20d847d1338f716fc9f143f633b6f79ba6017b5c.zip
base-files: upgrade: fix initramfs detection
Commit "initramfs: switch to tmpfs to fix ujail" switched initramfs to now use tmpfs, it causes $(rootfs_type) to now return tmpfs when running initramfs image instead of being empty. This broke initramfs detection which prevents config files from being saved as it does not work from initramfs. So, lets test for $(rootfs_type) returning "tmpfs" instead. Fixes: 7fd3c68 ("initramfs: switch to tmpfs to fix ujail) Signed-off-by: Robert Marko <robimarko@gmail.com>
Diffstat (limited to 'package/base-files/files/sbin/sysupgrade')
-rwxr-xr-xpackage/base-files/files/sbin/sysupgrade2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade
index ca2eb298dc..3300d8e1ea 100755
--- a/package/base-files/files/sbin/sysupgrade
+++ b/package/base-files/files/sbin/sysupgrade
@@ -216,7 +216,7 @@ include /lib/upgrade
do_save_conffiles() {
local conf_tar="$1"
- [ -z "$(rootfs_type)" ] && {
+ [ "$(rootfs_type)" = "tmpfs" ] && {
echo "Cannot save config while running from ramdisk." >&2
ask_bool 0 "Abort" && exit
rm -f "$conf_tar"