Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Udev rule not running script?
Post Flair (click to view more posts with a particular flair)
Post Body

Hey all. Trying to get my can devices to have the same can addresses(?) each time they are used. I've tried to get them to have the same address a few ways and it SEEMS to have worked but they are always STOPPED by default using this:

ACTION=="add", SUBSYSTEM=="net", ENV{ID_SERIAL_SHORT}=="480027001050535556323420", NAME="printerCAN0", RUN ="/home/dinec/E3_data/scripts/canbus_udev_rules.sh printerCAN0"

which gives it the printerCAN0 one but each time it shows up as `can state STOPPED` unless the device is unplugged and plugged back in. Is there any way to have it do that but without having to unplug and replug them automaticaly at boot? I have already chmod x on the script too. It works if the script is run on its own as well

This is the script that is canbus_udev_rules.sh:

#!/bin/bash

INTERFACE=$1

ip link set $INTERFACE type can bitrate 1000000

ip link set $INTERFACE up

Any help would be greatly appreciated

Author
Account Strength
100%
Account Age
12 years
Verified Email
Yes
Verified Flair
No
Total Karma
34,590
Link Karma
20,256
Comment Karma
13,259
Profile updated: 3 days ago
Posts updated: 4 days ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
8 months ago