]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - IMG/cpio/ventoy/hook/rhel7/ventoy-timeout.sh
Reduce the required low memory.
[Ventoy.git] / IMG / cpio / ventoy / hook / rhel7 / ventoy-timeout.sh
index a5db322c2e1082ad8f8d1262609a6e17762cb311..8aac1690cc926f8169f0496be2da06f00d211aec 100644 (file)
@@ -23,11 +23,14 @@ vtlog "##### $0 $* ..."
 
 VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
 
-blkdev_num=$(dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1:\2/')  
-vtDM=$(ventoy_find_dm_id ${blkdev_num})
+if [ ! -e /dev/ventoy ]; then
+    blkdev_num_mknod=$(dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1 \2/')
+    mknod -m 660 /dev/ventoy  b  $blkdev_num_mknod
+fi
 
-vtlog "diskroot $vtDM ..."
-/sbin/anaconda-diskroot /dev/dm-0    
-#/sbin/initqueue --settled --onetime --name anaconda-diskroot anaconda-diskroot  /dev/$vtDM
+if [ -e /sbin/anaconda-diskroot ]; then
+    vtlog "set anaconda-diskroot /dev/ventoy ..."
+    /sbin/anaconda-diskroot /dev/ventoy
+fi
 
 PATH=$VTPATH_OLD