man/sd-notify: /bin/bash -> /bin/sh, read -> read -r in example

This commit is contained in:
наб 2021-12-12 20:28:39 +01:00
parent f1e6f93372
commit a6ac4cbc4e
No known key found for this signature in database
GPG key ID: BCFD0B018D2658F1

View file

@ -166,13 +166,13 @@
after having set up its communication channel. During runtime it
sends further status updates to the init system:</para>
<programlisting>#!/bin/bash
<programlisting>#!/bin/sh
mkfifo /tmp/waldo
systemd-notify --ready --status="Waiting for data…"
while : ; do
read a &lt; /tmp/waldo
read -r a &lt; /tmp/waldo
systemd-notify --status="Processing $a"
# Do something with $a …