Skip to content
Snippets Groups Projects
Commit 309ee6f5 authored by Gioele Barabucci's avatar Gioele Barabucci Committed by Aurelien Jarno
Browse files

libc.preinst: Avoid using pidof

The use of `pidof` creates an implicit depency on `sysvinit-utils`.
`sysvinit-utils` is currently Essential, but that may change in the
future.

This specific use of `pidof` (finding if a process is running) is
simple enough to be replaced with `grep`'ing `/proc/*/cmdline`.
parent 03dfd67e
No related branches found
No related tags found
1 merge request!10libc.preinst: Avoid using pidof
......@@ -166,7 +166,7 @@ then
if [ -n "$preversion" ] && [ -x "$(command -v ischroot)" ] && ! ischroot; then
# NSS authentication trouble guard
if dpkg --compare-versions "$preversion" lt DEB_VERSION_UPSTREAM; then
if pidof xscreensaver xlockmore >/dev/null; then
if grep -E -q -z '/(xscreensaver|xlockmore)' /proc/*/cmdline 2>/dev/null; then
if [ "$USE_DEBCONF" ] ; then
db_version 2.0
db_reset glibc/disable-screensaver
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment