Skip to content

Commit c673a40

Browse files
committed
scripts/forensic-mark-readonly: Do not depend on printf
There is no need to depend on a separate binary when the shell's builtin `echo` function will suffice. Signed-off-by: Glenn Washburn <[email protected]>
1 parent 0a3a85f commit c673a40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

config/files/GRMLBASE/etc/udev/scripts/forensic-mark-readonly

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ if [ -r /etc/grml/forensic.conf ] ; then
7373

7474
if [ -n "${READONLY_IGNORE:-}" ] ; then
7575
if [ -n "${parent_device}" ] ; then
76-
if printf "%s\n" "${READONLY_IGNORE:-}" | grep -qw "${parent_device}" ; then
76+
if echo "${READONLY_IGNORE:-}" | grep -qw "${parent_device}" ; then
7777
logger -t forensic-mark-readonly "not setting '${BLOCK_DEVICE}' (parent device: '${parent_device}') to read-only as its parent is present in ignore list"
7878
exit 0
7979
fi
8080
fi
81-
if printf "%s\n" "${READONLY_IGNORE:-}" | grep -qw "${BLOCK_DEVICE}" ; then
81+
if echo "${READONLY_IGNORE:-}" | grep -qw "${BLOCK_DEVICE}" ; then
8282
logger -t forensic-mark-readonly "not setting '${BLOCK_DEVICE}' to read-only as present in ignore list"
8383
exit 0
8484
fi

0 commit comments

Comments
 (0)