Skip to content

Commit f0bce4e

Browse files
taukakaoNN708
authored andcommitted
improves migration script
1 parent 5482d11 commit f0bce4e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

includes.container/usr/share/initramfs-tools/scripts/local-bottom/vanilla-filesystem-upgrade

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ esac
1717
mount -o remount,rw ${rootmnt}
1818
if [ -d ${rootmnt}/.system ]; then
1919
echo "vanilla-filesystem-upgrade: Detected old filesystem at /.system, upgrading..."
20-
rm -f ${rootmnt}/etc ${rootmnt}/usr
20+
21+
set -e
22+
23+
rm -f ${rootmnt}/etc ${rootmnt}/usr ${rootmnt}/bin ${rootmnt}/lib ${rootmnt}/lib64 ${rootmnt}/sbin ${rootmnt}/vanilla.key
24+
rm -rf ${rootmnt}/FsGuard ${rootmnt}/sysconf
2125
mv ${rootmnt}/.system/FsGuard ${rootmnt}/.system/etc ${rootmnt}/.system/sysconf ${rootmnt}/.system/usr ${rootmnt}/.system/bin ${rootmnt}/.system/lib ${rootmnt}/.system/lib64 ${rootmnt}/.system/sbin ${rootmnt}/.system/vanilla.key ${rootmnt}
2226
rm -rf ${rootmnt}/.system
2327
echo "vanilla-filesystem-upgrade: Filesystem upgrade completed"

0 commit comments

Comments
 (0)