Error during IFL bootup [Fixed]

User discussion and information resource forum for Image products.
Post Reply
JSladek
Posts: 10
Joined: Sat Jul 28, 2018 11:19 am

Error during IFL bootup [Fixed]

Post by JSladek »

During bootup at "Setting up scripts directory and menu", I am getting an error for each of my eight scripts: The error message is "/tbu/utility/process-scripts: line 5" perl: command not found".

Code: Select all

#! /bin/bash

is_text_file() { 
	#grep -qI '.' "$1"
	perl -e 'exit((-B $ARGV[0])?1:0);' "$1"
}

# move scriptslist (ingoring case) out of scripts to utility as lowercase filename
cd /tbu/scripts; scriptsarray=(*); cd /tbu
nscripts=${#scriptsarray[@]}
if [ "$nscripts" = "1" ] && [ "${scriptsarray[0]}" = "*" ]; then exit 0; fi
if [ "$nscripts" -lt "1" ]; then exit 0; fi
let nscripts=nscripts-1
for i in `seq 0 $nscripts`
do
	echo "${scriptsarray[$i]}" | grep -i "scriptslist.txt" > /dev/null
	if [ "$?" = "0" ] && [ "${#scriptsarray[$i]}" = "15" ]; then
		mv /tbu/scripts/${scriptsarray[$i]} /tbu/utility/scriptslist.txt
		chmod 644 /tbu/utility/scriptslist.txt
		chown 0:0 /tbu/utility/scriptslist.txt
		fromdos /tbu/utility/scriptslist.txt
		break
	fi
done

#change owner to root
chmod 644 /tbu/scripts/* 2> /dev/null
chown 0:0 /tbu/scripts/* 2> /dev/null

#change permissions based on file type
cd /tbu/scripts; scriptsarray=(*); cd /tbu
nscripts=${#scriptsarray[@]}
if [ "$nscripts" = "1" ] && [ "${scriptsarray[0]}" = "*" ]; then exit 0; fi
if [ "$nscripts" -lt "1" ]; then exit 0; fi
let nscripts=nscripts-1
for i in `seq 0 $nscripts`
do

	if is_text_file /tbu/scripts/"${scriptsarray[$i]}" ; then
		fromdos /tbu/scripts/"${scriptsarray[$i]}" 2> /dev/null
	fi

	slength=${#scriptsarray[$i]}
	if [ "$slength" -ge "5" ]; then
		let slength=slength-1
		let startchar=slength-3
		last4char=${scriptsarray[$i]:$startchar:4}
		if [ "$last4char" = ".tbs" ] || [ "$last4char" = ".run" ] || [ "$last4char" = ".TBS" ] || [ "$last4char" = ".RUN" ]; then
			chmod 644 /tbu/scripts/"${scriptsarray[$i]}" 2> /dev/null
		else
			chmod 755 /tbu/scripts/"${scriptsarray[$i]}" 2> /dev/null
		fi
	else
		chmod 755 /tbu/scripts/"${scriptsarray[$i]}" 2> /dev/null
	fi
done
A typical script is:

Code: Select all

#! /bin/sh
imagel --b --uy --d:l1@0x286 --f:l1@0x285:"/DarkStar" --max:4GiB --v
cat /tbu/ifl.log
read -p "Press [Enter] key to continue..."
Apparently it's not a critical issue becasue all of my scripts work with no error generation. Can anyone explain what the problem is here?
JSladek
Posts: 10
Joined: Sat Jul 28, 2018 11:19 am

Re: Error during IFL bootup [Fixed]

Post by JSladek »

Fixed with v3.50. "change(d) scripts to use grep instead of perl to detect binary files"

Thanks ....
Post Reply