mirror of
https://github.com/ventoy/Ventoy.git
synced 2026-11-18 11:43:32 +01:00
Change hard coded dracut hooks directory to variable. (#3753)
Some distros (e.g. Fedora 45) change dracut hooks directory from /lib/dracut/hooks to /var/lib/dracut/hooks
This commit is contained in:
@@ -32,6 +32,11 @@ VTOY_DM_PATH=/dev/mapper/ventoy
|
||||
VTOY_DEBUG_LEVEL=$($BUSYBOX_PATH/hexdump -n 1 -s 450 -e '1/1 "%02x"' $VTOY_PATH/ventoy_os_param)
|
||||
VTOY_LINUX_REMOUNT=$($BUSYBOX_PATH/hexdump -n 1 -s 454 -e '1/1 "%02x"' $VTOY_PATH/ventoy_os_param)
|
||||
VTOY_VLNK_BOOT=$($BUSYBOX_PATH/hexdump -n 1 -s 455 -e '1/1 "%02x"' $VTOY_PATH/ventoy_os_param)
|
||||
if [ -d /var/lib/dracut/hooks ]; then
|
||||
VT_DRACUT_HOOKS=/var/lib/dracut/hooks
|
||||
else
|
||||
VT_DRACUT_HOOKS=/lib/dracut/hooks
|
||||
fi
|
||||
|
||||
if [ "$VTOY_DEBUG_LEVEL" = "01" ]; then
|
||||
if [ -e /dev/console ]; then
|
||||
@@ -39,6 +44,7 @@ if [ "$VTOY_DEBUG_LEVEL" = "01" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
vtlog() {
|
||||
if [ "$VTLOG" = "$VTOY_PATH/log" ]; then
|
||||
echo "$*" >>$VTLOG
|
||||
|
||||
Reference in New Issue
Block a user