|
33 | 33 | #### Variables |
34 | 34 | ######################################################################## |
35 | 35 | # Versioning |
36 | | -version="Version: 01.00-16, Script Date: 2022.06.12" |
| 36 | +version="Version: 01.00-18, Script Date: 2022.06.15" |
37 | 37 | #md5_sum=$(md5sum $sname | sed 's/system.*//g' ) |
38 | 38 | arg1=$1 |
39 | 39 | arg2=$2 |
@@ -172,6 +172,18 @@ function CheckArgs() |
172 | 172 | fi |
173 | 173 | } |
174 | 174 |
|
| 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 | + |
175 | 187 | function CheckPrerequisites() |
176 | 188 | { |
177 | 189 | ## Check if all necessary programs are available. Called once by Main(). |
@@ -239,11 +251,21 @@ function CheckPrerequisites() |
239 | 251 | missing_programs="$missing_programs\n$Program" |
240 | 252 | debug "'$Program' is not installed" 1 |
241 | 253 | elif [[ "$Program" == "pastebinit" ]] || [[ "$Program" == "wget" ]] || [[ "$Program" == "curl" ]] || [[ "$Program" == "nc" ]] |
242 | | - then |
| 254 | + then |
243 | 255 | check_prog=0; |
244 | 256 | check_paster=$((check_paster+1)); |
245 | 257 | missing_paster_progs="$missing_paster_progs$Program, " |
246 | 258 | 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 |
247 | 269 | else |
248 | 270 | echo -e "'$Program' is not installed." |
249 | 271 | check_prog=0; |
@@ -876,7 +898,7 @@ function GetInstallMedia() |
876 | 898 | fi |
877 | 899 | else |
878 | 900 | 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)." |
880 | 902 | fi |
881 | 903 | } |
882 | 904 |
|
@@ -1496,6 +1518,7 @@ logger() |
1496 | 1518 | ## PreProcessing |
1497 | 1519 | CheckArgs # Check external arguments: [<ScriptName> arg1] |
1498 | 1520 | CheckRoot # Check if ran as root |
| 1521 | +CheckTypeError |
1499 | 1522 | CheckPrerequisites |
1500 | 1523 | ## Report |
1501 | 1524 | UserInput |
|
0 commit comments