Skip to content

Commit

Permalink
Fix chasset/restoptions
Browse files Browse the repository at this point in the history
  • Loading branch information
HMBJOrth committed Apr 20, 2023
1 parent 180b21a commit 0b1164a
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 24 deletions.
5 changes: 4 additions & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
:author2: Justin Langosch
:email: Juergen.Orth@fujitsu.com
:email2: justin.langosch@fujitsu.com
:version: v6
:version: v7
:imagesdir: img/
:toc: preamble
ifdef::env-github[]
Expand All @@ -27,6 +27,9 @@ IMPORTANT: *#Please note: This tool set is provided W/O ANY WARRANTY and usage a
.ChangeLog
|=================
|Version|Date|Author|Changes
|7|2023-04-19|mailto:{email}[{Author}]|
x fixed issue with `chasset` +
x export IRMC, USER, PW vars in `restoption`
|6|2023-03-28|mailto:{email}[{Author}]|
+ Security enhancement for `resttool` +
+ Some corrections in README
Expand Down
38 changes: 21 additions & 17 deletions chasset
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,29 @@
#
# (c) Juergen Orth - Fujitsu Technology Solutions GmbH
#
# $Id: chasset 80 2020-11-25 12:11:26Z HMBJOrth $
# $Id: chasset 181 2023-04-19 21:37:20Z HMBJOrth $

. ${0%/*}/restoptions
. ${0%/*}/resttool

showinfo "Setting asset tag to \"$*\""

echo '{
"Server":{
"SystemConfig":{
"IrmcConfig":{
"@Processing":"execute",
"System":{
"AssetTag":"'$*'"
},
"@Version":"1.04"
}
},
"@Version":"1.01"
}
}
' | ${0%/*}/restsetprofile -i $IRMC -u $USER -p "$PW" -d $DEBUGLEVEL /dev/fd/0
tmpfile=$(mktemp)
echo '
{
"Server":{
"SystemConfig":{
"IrmcConfig":{
"@Processing":"execute",
"System":{
"AssetTag":"'$*'"
},
"@Version":"1.04"
}
},
"@Version":"1.01"
}
}
' >$tmpfile
${0%/*}/restsetprofile $tmpfile
#${0%/*}/restsetprofile -i $IRMC -u $USER -p "$PW" $tmpfile
rm $tmpfile
Binary file modified doc/README.pdf
Binary file not shown.
14 changes: 8 additions & 6 deletions restoptions
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# (c) Juergen Orth - Fujitsu Technology Solutions GmbH
#
# $Id: restoptions 174 2023-03-28 14:08:48Z HMBJOrth $
# $Id: restoptions 184 2023-04-20 07:36:01Z HMBJOrth $

################################################################################
#
Expand All @@ -19,16 +19,16 @@ IRMC=${IRMC:-10.172.124.82}

# USER: iRMC User with appropriate rights (default: administrator)
USER=${IRMC_CRED%:*}
USER=${USER:-admin} # if iRMC_CRED not set use defaults
USER=${USER:-admin} # if iRMC_CRED not set use defaults

# PD: Password for above USER (default: admin)
PW=${IRMC_CRED#*:}
PW=${PW:-${DCDEFAULTPW:-admin}} # if iRMC_CRED not set use defaults

# Profile settings
DEFAULTPROFILE=IrmcConfig/BootConfig
JSON=profile.json # Filename of profile json string
POSTOPTION="" # Option for Post (inhibit reboot)
JSON=profile.json # Filename of profile json string
POSTOPTION="" # Option for Post (inhibit reboot)

# Custom image settings
CUSTOMIMAGEURLPATH="http://10.172.125.100/DownloadManager/globalflash/iso"
Expand All @@ -40,10 +40,12 @@ DEFAULTOSID=3
DEFAULTOS=deploy/esxi67u3_IDE_m2.json

# Reset options
RESETWAITTIME=10 # Waittime before performing reset
RESETWAITTIME=10 # Waittime before performing reset

# Debug settings
DEBUGLEVEL=0 # Debuglevel: 0=nothing, 1=low, 2=medium, 3=high
DEBUGLEVEL=0 # Debuglevel: 0=nothing, 1=low, 2=medium, 3=high

export IRMC USER PW DEFAULTPROFILE JSON POSTOPTION CUSTOMIMAGEURLPATH CUSTOMIMAGESUFFIX DEFAULTOSID DEFAULTOS RESETWAITTIME DEBUGLEVEL

################################################################################
#
Expand Down

0 comments on commit 0b1164a

Please sign in to comment.