how to auto-start socketcan interface

This forum covers PCAN-Linux and Linux development issues concerning our products
Post Reply
bryancole
Posts: 11
Joined: Thu 29. Nov 2018, 16:32

how to auto-start socketcan interface

Post by bryancole » Wed 5. Dec 2018, 18:21

Hi,

I realise this isn't PEAK-specific but, can anyone here suggest the best way to configure socketcan (i.e. netdev) devices to come up on boot, so I don't have to issue the "sudo ip link set up can0" manually (which works but isn't helpful for a user-space app without root access).

Something Fedora27-compatible (i.e. redhat). A udev-rule seems like a good plan what what is the correct even to trigger off? I tried making a network script under /etc/sysconfig/network-scripts/ifcfg-can0 but it doesn't seem to do anything. I'm not sure how network scripts get registered.

Thanks.

bryancole
Posts: 11
Joined: Thu 29. Nov 2018, 16:32

Re: how to auto-start socketcan interface

Post by bryancole » Wed 5. Dec 2018, 18:45

OK, I found a solution here: https://gist.github.com/sebastianhaas/f ... 97f49d33d4

Systemd is awesome.

Post Reply