The C Source, Patches and (shudder!) Bugs
Post Reply
ravenexp
Posts: 1
Joined: 08 Aug 2017, 11:07

[PATCH] Use realpath instead of readlink to detect init.

Post by ravenexp » 08 Aug 2017, 11:12

As it is, usb_modeswitch was broken on my distro because of how systemd is configured.
Attachments
0001-Use-realpath-instead-of-readlink-to-detect-init.patch
(905 Bytes) Downloaded 743 times

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: [PATCH] Use realpath instead of readlink to detect init.

Post by Josh » 09 Aug 2017, 19:10

I can see the problem - however, "realpath" is not available on every system I checked.

Did you try the parameter -f with "readlink"? That seems to do the job, following a chain of symlinks up to the real file.
If you can confirm this, I'll add a fix to the usb_modeswitch package.

Post Reply