File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change 3333# ### Variables
3434# #######################################################################
3535# Versioning
36- version=" Version: 01.00-10 , Script Date: 2022.06.03 "
36+ version=" Version: 01.00-11 , Script Date: 2022.06.06 "
3737# md5_sum=$(md5sum $sname | sed 's/system.*//g' )
3838arg1=$1
3939arg2=$2
@@ -858,10 +858,20 @@ function GetInstallMedia()
858858 # Only displays if it was installed traditionally
859859 if [ -d /var/log/installer/ ]
860860 then
861- installer_media=$( sudo head -n 1 /var/log/installer/media-info | awk ' {print "Original Installation Media: "$0}' )
862- echo -e " $installer_media "
861+ # Check to See if the media-info file was created before trying to read it...
862+ # On some pre-created Ubuntu Image Files now available, the /var/log/installer directory exists
863+ # but the files within that directory have been removed before release for distribution.
864+ if [ -f /var/log/installer/media-info ]
865+ then
866+ installer_media=$( sudo head -n 1 /var/log/installer/media-info | awk ' {print "Original Installation Media: "$0}' )
867+ echo -e " $installer_media "
868+ else
869+ echo -e " The Installer log directory exists, but the Installer log files have been removed."
870+ echo -e " This system may have been installed from a distribution image file."
871+ fi
863872 else
864- echo -e " Original Installation Media: Cannot determine which ISO this was installed from. May have been an image file."
873+ echo -e " Original Installation Media: Cannot determine which ISO this was installed from. "
874+ echo =e " The Installer Log Directory does not exist. May have been from a preconfigured image file."
865875 fi
866876}
867877
You can’t perform that action at this time.
0 commit comments