Skip to content

Commit cc7163e

Browse files
committed
Added code to include Debian permission caveots.
1 parent 309ef45 commit cc7163e

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

system-info

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#### Variables
3434
########################################################################
3535
# Versioning
36-
version="Version: 01.00-16, Script Date: 2022.06.12"
36+
version="Version: 01.00-18, Script Date: 2022.06.15"
3737
#md5_sum=$(md5sum $sname | sed 's/system.*//g' )
3838
arg1=$1
3939
arg2=$2
@@ -172,6 +172,18 @@ function CheckArgs()
172172
fi
173173
}
174174

175+
function CheckTypeError() {
176+
sudu type -a type > /dev/null 2>&1
177+
TypeError=$?
178+
if [[ "$TypeError" == "1" ]]
179+
then
180+
echo -e "The 'type' command is not found as an internal builtin command on this "
181+
echo -e "system. Cannot check for prerequisite Linux utilities used in this script."
182+
echo -e "This script will run, but may display some errors."
183+
nl
184+
fi
185+
}
186+
175187
function CheckPrerequisites()
176188
{
177189
## Check if all necessary programs are available. Called once by Main().
@@ -239,11 +251,21 @@ function CheckPrerequisites()
239251
missing_programs="$missing_programs\n$Program"
240252
debug "'$Program' is not installed" 1
241253
elif [[ "$Program" == "pastebinit" ]] || [[ "$Program" == "wget" ]] || [[ "$Program" == "curl" ]] || [[ "$Program" == "nc" ]]
242-
then
254+
then
243255
check_prog=0;
244256
check_paster=$((check_paster+1));
245257
missing_paster_progs="$missing_paster_progs$Program, "
246258
missing_programs="$missing_programs\n$Program"
259+
# To take care of a permssions check issue on Debian, 2022.06.15
260+
elif [[ "$Program" == "fdisk" ]]
261+
then
262+
LSB_ID=$(lsb_release -si)
263+
if [[ "$LSB_ID" == "Debian" ]]
264+
then
265+
# Set Debian as an exception
266+
check_prog=0;
267+
debug "System is $LSB_ID" 1
268+
fi
247269
else
248270
echo -e "'$Program' is not installed."
249271
check_prog=0;
@@ -876,7 +898,7 @@ function GetInstallMedia()
876898
fi
877899
else
878900
echo -e "Original Installation Media: Cannot determine which ISO this was installed from. "
879-
echo -e "The Installer Log Directory does not exist. May have been from a preconfigured image file."
901+
echo -e "The Installer Log Directory does not exist. This system may have been from a Live Image Environment (LIE)."
880902
fi
881903
}
882904

@@ -1496,6 +1518,7 @@ logger()
14961518
## PreProcessing
14971519
CheckArgs # Check external arguments: [<ScriptName> arg1]
14981520
CheckRoot # Check if ran as root
1521+
CheckTypeError
14991522
CheckPrerequisites
15001523
## Report
15011524
UserInput

0 commit comments

Comments
 (0)