Back
Type Name Operations
funcs Open
payload Open
00-secupd-dell.rules
98-secupdusb.rules
BiosVerifyLinux.bin
ErrorCodes.xml
HashOfHashFileList.txt
Licenses.zip
LinuxDepWrapperLinux.bin
OSFlavourUtils.sh
PIEConfig.sh
PIEConfig.sh.tmp
PIEInfo.txt
SMAL_DBG.log
UpdRollBack
Version.txt
baseutils.log
biosie.bin
buildVer.sh
check_stop_omsa_service.sh
debug_inv.log
debug_update.log
disneyinstall.sh
donotmovepayload
dsm_dupbios_restore.sh
dsm_dupbios_restore.sh.tmp
dsm_installscript.sh
dsmipmi.log
dsmipmi_internal.log
dupdebuglog
dupdisneyinstall.sh
dupname.sh
duppmdatacollector.bin
en.prop
getSystemId
hapi64.tgz
inv.xml
mc.txt
os_mapping.xml
package.xml
package.xml.sign
rollback_attempt.txt
smbiosHelp.txt
spUtilityHelp.txt
spconfig.xml
sphelp.txt
spsetup.sh
sputility.bin
svmExeMsg.xsl
temp_UpdRollBack.txt
uni-eol.txt

File Transfer

Upload files to current directory

File Editor: OSFlavourUtils.sh

checkIfESXi() { local ESXi=1; if [ -f /bin/vmware ]; then vmware -v | grep -iq "ESXi" > /dev/null 2>&1 if [ $? = 0 ]; then ESXi=0 > /dev/null 2>&1; echo "$ESXi" fi else echo "$ESXi" fi } # This Function is to get Log locaton path getHAPIpath() { # echo $1 _ESXiSYSTEM=$(checkIfESXi) if [ "$_ESXiSYSTEM" = 0 ]; then echo "/scratch/opt/dell/dup/lib:/scratch/opt/dell/dup64/lib" else echo "/opt/dell/dup/lib:/opt/dell/dup64/lib" fi } getBASELOGDir() { _ESXiSYSTEM=$(checkIfESXi) if [ "$_ESXiSYSTEM" = 0 ]; then echo "/scratch/var/log" else echo "/var/log" fi } getPSCommand() { _ESXiSYSTEM=$(checkIfESXi) if [ "$_ESXiSYSTEM" = 0 ]; then echo "ps" else echo "ps -e" fi } getTempFilePath() { _ESXiSYSTEM=$(checkIfESXi) if [ "$_ESXiSYSTEM" = 0 ]; then _ESXiSecureBoot=$(checkIfSecureBootEnabled) if [ "$_ESXiSecureBoot" = 0 ]; then get_size_required _REQUIRED_SIZE_IN_MB=$? _ADDITIONAL_SIZE=100 _FINAL_REQ_SIZE=$(($_REQUIRED_SIZE_IN_MB + $_ADDITIONAL_SIZE)) create_ramdisk "$_FINAL_REQ_SIZE" "$_RAMDISK_NAME" _RETURN_PATH=/$_RAMDISK_NAME _IS_RAMDISK=$_TRUE echo "$_RETURN_PATH" else echo "/scratch/tmp" fi else echo "/opt/dell/updatepackage" fi } get_size_required() { _TMP_RETURN=0 _TEMP_ARCHIVE=$(mktemp $_TMPFILE_PREFIX-$_PACKAGENAME$$.XXXXXX) || return $_TMP_RETURN iArchive_mark=$(grep -m2 -an "$_DUP_ARCHIVE_MARKER" $_PACKAGENAME | tail -n1 | cut -d ":" -f 1) iArchive0_mark=$((iArchive_mark+1)) tail -n +${iArchive0_mark} $_PACKAGENAME > $_TEMP_ARCHIVE _FULL_ARCHIVE_SIZE=$(GZIP='-q' zcat $_TEMP_ARCHIVE | wc -c) rm -f $_TEMP_ARCHIVE _TMP_REQUIRED_SPACE_MINIMUM_K=$(((${_FULL_ARCHIVE_SIZE} + 1024 * 1024)/1024)) _TMP_REQUIRED_SPACE_MINIMUM_K=$((_TMP_REQUIRED_SPACE_MINIMUM_K+_DUP_SIZE_K)) _TMP_REQUIRED_SPACE_MINIMUM_M=$(($_TMP_REQUIRED_SPACE_MINIMUM_K/1024)) return $_TMP_REQUIRED_SPACE_MINIMUM_M } checkIfSecureBootEnabled() { secureBoot=1; if [ -f /usr/lib/vmware/secureboot/bin/secureBoot.py ]; then /usr/lib/vmware/secureboot/bin/secureBoot.py -s | grep -iq "Enabled" > /dev/null 2>&1 if [ $? = 0 ]; then secureBoot=0 > /dev/null 2>&1; fi fi echo "$secureBoot" } create_ramdisk() { _RMDISK_NAME=$2 _SIZE=$1 mkdir "/$_RMDISK_NAME" > /dev/null 2>&1 esxcli system visorfs ramdisk add -m "$_SIZE" -M "$_SIZE" -n "$_RMDISK_NAME" -t "/$_RMDISK_NAME" -p 0755 >/dev/null 2>&1 } remove_ramdisk() { esxcli system visorfs ramdisk remove -t /dupramdisk/ >/dev/null 2>&1 rm -rf /dupramdisk/ >/dev/null 2>&1 } getTempFilePrefix() { _ESXiSYSTEM=$(checkIfESXi) if [ "$_ESXiSYSTEM" = 0 ]; then if [ ! -d "/scratch/tmp/" ]; then mkdir /scratch/tmp/ fi echo "/scratch/tmp/.dellSez" else echo "/tmp/.dellSez" fi } os_exception_dup() { CLU_ARCH=$1 if [ -f /etc/vmware-release ]; then if [ -f "${LXNAME64}/sasdupie" ]; then CLU_ARCH=i386 fi fi _ESXiSYSTEM=$(checkIfESXi) if [ "$_ESXiSYSTEM" = 0 ]; then CLU_ARCH=i386 fi echo $CLU_ARCH } isRoot() { which id >/dev/null 2>&1 if [ $? = 0 ]; then uid="$(id -ru)" else uid=$(grep ^"$USER": /etc/passwd | sed "s/^$USER:.*:\(.*\):.*:.*:.*:.*/\1/") fi [ ! -z "$uid" -a "$uid" = 0 ] } logSystem() { eventID=$1 eventDescription="$2" if [ ! -z "$eventDescription" ]; then aMsg_0="Update Package: "$_PACKAGENAME aMsg_1="$eventDescription" aMsg_2="" else sLUCategory="$pkgCategory" sCompType="$pkgComponentTypeDisplay" # Check if both strings are exactly same - case insensitive comparison echo "$sLUCategory" | grep -i "^$sCompType$" >/dev/null 2>&1 if [ $? = 0 ]; then sServiceName="Update Package: $sLUCategory" else sServiceName="Update Package: $sLUCategory $sCompType:" fi if [ ! -z "$_SUPPORT_LOG_FILE" ]; then sSupportLogSpec="Support Log path=$_SUPPORT_LOG_FILE" fi aMsg_0=$sServiceName aMsg_1="$(msgFmt PKGLOG_MESSAGE_RETCODE_"$eventID")" aMsg_2=$sSupportLogSpec fi which logger > /dev/null 2>&1 && logger "$aMsg_0" "$aMsg_1" "$aMsg_2" }