fickit: Fallback on 7zip if isoinfo doesn't work
This commit is contained in:
parent
e65c54ea37
commit
01281adf28
@ -9,10 +9,18 @@ escape_newline () {
|
||||
|
||||
if [ $# -gt 0 ]
|
||||
then
|
||||
which jq > /dev/null 2> /dev/null || { echo "Please install jq" >&2; exit 1; }
|
||||
|
||||
# Expect a previous ISO to update:
|
||||
# Keep: DM_CRYPT, DHPARAMs and SYNCHRO_SSH_KEY
|
||||
|
||||
isoinfo -i "$1" -X -find -iname "USER_DAT*"
|
||||
isoinfo -i "$1" -X -find -iname "USER_DAT*" || 7z x "$1"
|
||||
|
||||
FNAME="USER_DAT.\;1"
|
||||
if ! [ -f "$FNAME" ] && [ -f user-data ]
|
||||
then
|
||||
FNAME="user-data"
|
||||
fi
|
||||
|
||||
export DM_CRYPT=$(jq -r '."dm-crypt".entries.key.content' USER_DAT.\;1)
|
||||
export DHPARAM=$(jq -r '."tls_config".entries."dhparams-4096.pem".content' USER_DAT.\;1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user