mirror of
https://github.com/systemd/systemd
synced 2024-10-15 20:45:09 +00:00
TEST-15: use ${:?} and shorten things a bit
This commit is contained in:
parent
c0d4409219
commit
5169595ec3
|
@ -32,12 +32,9 @@ create_service () {
|
|||
Description=$SERVICE_NAME unit
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/sleep 100000
|
||||
ExecStart=sleep 100000
|
||||
EOF
|
||||
mkdir -p /{etc,run,usr/lib}/systemd/system/"$SERVICE_NAME".service.d
|
||||
mkdir -p /etc/systemd/system/"$SERVICE_NAME".service.{wants,requires}
|
||||
mkdir -p /run/systemd/system/"$SERVICE_NAME".service.{wants,requires}
|
||||
mkdir -p /usr/lib/systemd/system/"$SERVICE_NAME".service.{wants,requires}
|
||||
mkdir -p /{etc,run,usr/lib}/systemd/system/"$SERVICE_NAME".service.{d,wants,requires}
|
||||
}
|
||||
|
||||
create_services () {
|
||||
|
@ -47,12 +44,10 @@ create_services () {
|
|||
}
|
||||
|
||||
check_ok () {
|
||||
[ $# -eq 3 ] || return
|
||||
|
||||
x="$(systemctl show --value -p "$2" "$1")"
|
||||
x="$(systemctl show --value -p "${2:?}" "${1:?}")"
|
||||
case "$x" in
|
||||
*$3*) return 0 ;;
|
||||
*) return 1 ;;
|
||||
*${3:?}*) return 0 ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue