From 8d9db28b4a05dc8ff3ff86ba2179aaa2f3c1458e Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Sun, 7 Jan 2024 19:47:53 +0100 Subject: liveinit: code polish --- liveinit.tpl | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'liveinit.tpl') diff --git a/liveinit.tpl b/liveinit.tpl index cc292a9..c4fd29a 100644 --- a/liveinit.tpl +++ b/liveinit.tpl @@ -600,13 +600,13 @@ if [ "$RESCUE" = "" ]; then mknod -m660 $lodev b 7 $(echo $lodev |sed 's%/dev/loop%%') fi echo "$lodev" - } + } # End find_loop() mod_base() { MY_MOD="$1" echo $(basename ${MY_MOD}) |rev |cut -d. -f2- |rev - } + } # End mod_base() find_mod() { MY_LOC="$1" @@ -628,7 +628,7 @@ if [ "$RESCUE" = "" ]; then done ) | sort fi - } + } # End find_mod() find_modloc() { MY_LOC="$1" @@ -646,7 +646,7 @@ if [ "$RESCUE" = "" ]; then fi echo "${MY_LOC}" - } + } # End find_modloc() load_modules() { # SUBSYS can be 'system', 'addons', 'optional', 'core2ram': @@ -706,10 +706,10 @@ if [ "$RESCUE" = "" ]; then echo "${MARKER}: '$SUBSYS' modules were not found. Trouble ahead..." fi fi - } + } # End load_modules() # Function input is a series of device node names. Return all block devices: - ret_blockdev () { + ret_blockdev() { local OUTPUT="" for IDEV in $* ; do if [ -e /sys/block/$(basename $IDEV) ]; then @@ -719,10 +719,10 @@ if [ "$RESCUE" = "" ]; then done # Trim trailing space: echo $OUTPUT |cat - } + } # End ret_blockdev() # Function input is a series of device node names. Return all partitions: - ret_partition () { + ret_partition() { local OUTPUT="" for IDEV in $* ; do if [ -e /sys/class/block/$(basename $IDEV)/partition ]; then @@ -732,7 +732,7 @@ if [ "$RESCUE" = "" ]; then done # Trim trailing space: echo $OUTPUT |cat - } + } # End ret_partition() # Return device node of Ventoy partition if found: # Function input: @@ -743,7 +743,7 @@ if [ "$RESCUE" = "" ]; then # return the device node for the partition containing the ISO file; # 'diskuuid' request: return the UUID for the disk; # 'partnr' request: return the number of the partition containing the ISO; - ret_ventoy () { + ret_ventoy() { local VOSPARMS="$1" local VACTION="$2" local DISKSIZE="" @@ -795,7 +795,7 @@ if [ "$RESCUE" = "" ]; then echo scandev fi fi - } + } # End ret_ventoy() # Find partition on which a file resides: # Function input: -- cgit v1.2.3