udev rule invokes /usr/bin/systemctl which is not available in split-usr systems

Bug #1483201 reported by Felipe Sateler
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
New
Undecided
Unassigned

Bug Description

56-hpmud.rules has:

ENV{hp_test}=="yes", PROGRAM="/bin/sh -c 'logger -p user.info loading HP Device $env{BUSNUM} $env{DEVNUM}'", RUN+="/bin/sh -c 'if [ -f /usr/bin/systemctl ]; then /usr/bin/systemctl --no-block start hplip-printer@$env{BUSNUM}:$env{DEVNUM}.service; else /usr/bin/nohup /usr/bin/python /usr/bin/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM} ; fi &'"

On split-usr systems (like debian and ubuntu), systemctl lives in /bin, so the if condition will not be true if /usr was not mounted by the time the udev rule triggers. So the rule should test for /bin in such systems.

Maybe the rule should change to use SYSTEMD_WANTS directive instead.

http://www.freedesktop.org/software/systemd/man/systemd.device.html

Revision history for this message
Jiri Popelka (jpopelka) wrote :

See also bug #1479431

Revision history for this message
Sanjay Kumar (sanjay-kumar14) wrote :

Please find the update in bug #1479431.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.