Pattern extensibility causes trouble: avoid it here

This commit is contained in:
Tony Garnock-Jones 2024-05-24 15:17:47 +02:00
parent d679b73c7d
commit ce98361178
3 changed files with 6 additions and 6 deletions

View File

@ -1,6 +1,6 @@
# Sending <exec SOMECOMMAND RESTARTPOLICY> causes the command to be run.
# Sending <exec/restart SOMECOMMAND RESTARTPOLICY> causes the command to be run.
#
?? <exec ?argv ?restartPolicy> [
?? <exec/restart ?argv ?restartPolicy> [
let ?id = timestamp
let ?facet = facet
let ?d = <temporary-exec $id $argv>
@ -16,4 +16,4 @@
# If the restart policy is not specified, it is defaulted to `on-error`.
#
?? <exec ?argv> ! <exec $argv on-error>
?? <exec ?argv> ! <exec/restart $argv on-error>

View File

@ -40,6 +40,6 @@
# So instead we kill the qmicli program with a signal, which *does* trigger the supervisor
# in the right way.
let ?pid = stringify $pid
$config ! <exec ["kill", "-INT", $pid] never>
$config ! <exec/restart ["kill", "-INT", $pid] never>
]
]

View File

@ -7,7 +7,7 @@
? <configure-interface ?ifname <static ?ipaddr>> [
! <exec ["ip" "address" "add" "dev" $ifname $ipaddr]>
?- ! <exec ["ip" "address" "del" "dev" $ifname $ipaddr] never>
?- ! <exec/restart ["ip" "address" "del" "dev" $ifname $ipaddr] never>
]
? <configure-interface ?ifname <dhcp>> [
@ -35,7 +35,7 @@
$log ! <log "-" { saw-machine-interface: $ifname }>
$config [
! <exec ["ip" "link" "set" $ifname "up"]>
?- ! <exec ["ip" "link" "set" $ifname "down"] never>
?- ! <exec/restart ["ip" "link" "set" $ifname "down"] never>
]
]