mirror of
https://github.com/systemd/systemd
synced 2024-10-15 04:24:19 +00:00
man/sd-notify: /bin/bash -> /bin/sh, read -> read -r in example
This commit is contained in:
parent
f1e6f93372
commit
a6ac4cbc4e
|
@ -166,13 +166,13 @@
|
||||||
after having set up its communication channel. During runtime it
|
after having set up its communication channel. During runtime it
|
||||||
sends further status updates to the init system:</para>
|
sends further status updates to the init system:</para>
|
||||||
|
|
||||||
<programlisting>#!/bin/bash
|
<programlisting>#!/bin/sh
|
||||||
|
|
||||||
mkfifo /tmp/waldo
|
mkfifo /tmp/waldo
|
||||||
systemd-notify --ready --status="Waiting for data…"
|
systemd-notify --ready --status="Waiting for data…"
|
||||||
|
|
||||||
while : ; do
|
while : ; do
|
||||||
read a < /tmp/waldo
|
read -r a < /tmp/waldo
|
||||||
systemd-notify --status="Processing $a"
|
systemd-notify --status="Processing $a"
|
||||||
|
|
||||||
# Do something with $a …
|
# Do something with $a …
|
||||||
|
|
Loading…
Reference in a new issue