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

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

Post by ravenexp » Tue Aug 08, 2017 11:12 am

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 224 times

Josh
Site Admin
Posts: 6534
Joined: Sat Nov 03, 2007 12:30 am

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

Post by Josh » Wed Aug 09, 2017 7:10 pm

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