Fix the bug when booting latest KaOS. (#1696)

This commit is contained in:
longpanda
2022-06-27 09:23:34 +08:00
parent 6d72617ef6
commit 24b05c0345
3 changed files with 128 additions and 41 deletions

View File

@@ -2,5 +2,14 @@
. $VTOY_PATH/hook/ventoy-os-lib.sh
ventoy_systemd_udevd_work_around
ventoy_add_udev_rule "$VTOY_PATH/hook/kaos/udev_disk_hook.sh %k"
if $GREP -q '^"$mount_handler"' /init; then
echo 'use mount_handler1 ...' >> $VTLOG
$SED "/^\"\$mount_handler\"/i\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/kaos/ventoy-disk.sh" -i /init
elif $GREP -q '^$mount_handler' /init; then
echo 'use mount_handler2 ...' >> $VTLOG
$SED "/^\$mount_handler/i\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/kaos/ventoy-disk.sh" -i /init
fi
if [ -f $VTOY_PATH/ventoy_persistent_map ]; then
$SED "1 aexport cow_label=vtoycow" -i /init
fi