mirror of
https://github.com/ventoy/Ventoy.git
synced 2026-12-05 11:56:51 +01:00
Fix the boot issue for nixos 2605+ (#3813)
This commit is contained in:
@@ -19,7 +19,17 @@
|
||||
|
||||
. $VTOY_PATH/hook/ventoy-os-lib.sh
|
||||
|
||||
vtRuleFile=$($FIND / -name '*.rules' -type f | $GREP udev | $HEAD -n1)
|
||||
PATH=$BUSYBOX_PATH/:$VTOY_PATH/tool:$PATH
|
||||
|
||||
ventoy_add_udev_rule_with_path "$VTOY_PATH/hook/default/udev_disk_hook.sh %k noreplace" "${vtRuleFile%/*}/99-ventoy.rules"
|
||||
if [ -e /etc/systemd/system ]; then
|
||||
system=$($FIND /nix -type d | $GREP 'initrd-units$')
|
||||
echo "nixos with systemd $system" >> $VTLOG
|
||||
|
||||
mkdir -p $system/initrd-root-device.target.wants
|
||||
cp -a $VTOY_PATH/hook/nixos/ventoy-disk.service $system/
|
||||
ln -sf $system/ventoy-disk.service $system/initrd-root-device.target.wants/ventoy-disk.service
|
||||
else
|
||||
echo "nixos init script" >> $VTLOG
|
||||
vtRuleFile=$($FIND / -name '*.rules' -type f | $GREP udev | $HEAD -n1)
|
||||
ventoy_add_udev_rule_with_path "$VTOY_PATH/hook/default/udev_disk_hook.sh %k noreplace" "${vtRuleFile%/*}/99-ventoy.rules"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user