Merge branch 'debian' of https://github.com/nrgaway/core-agent-linux into debian
This commit is contained in:
commit
599fad53a2
9
debian/qubes-core-agent.postinst
vendored
9
debian/qubes-core-agent.postinst
vendored
@ -117,18 +117,22 @@ systemdInfo() {
|
||||
unit=${1}
|
||||
return_global_var=${2}
|
||||
|
||||
declare -A INFO
|
||||
declare -A INFO=()
|
||||
while read line; do
|
||||
INFO[${line%%=*}]="${line##*=}"
|
||||
done < <(systemctl show ${unit} 2> /dev/null)
|
||||
|
||||
setArrayAsGlobal INFO $return_global_var
|
||||
return ${#INFO[@]}
|
||||
}
|
||||
|
||||
displayFailedStatus() {
|
||||
action=${1}
|
||||
unit=${2}
|
||||
|
||||
systemdInfo ${unit} info
|
||||
# Only display if there are results. In chroot environmnet there will be
|
||||
# no results to 'systemctl show' command
|
||||
systemdInfo ${unit} info || {
|
||||
echo
|
||||
echo "==================================================="
|
||||
echo "FAILED: systemd ${action} ${unit}"
|
||||
@ -140,6 +144,7 @@ displayFailedStatus() {
|
||||
echo "UnitFileState = ${info[UnitFileState]}"
|
||||
echo
|
||||
}
|
||||
}
|
||||
|
||||
# Disable systemd units
|
||||
disableSystemdUnits() {
|
||||
|
Loading…
Reference in New Issue
Block a user