# udev rule not working

**URL:** https://forums.suse.com/t/udev-rule-not-working/28539
**Category:** SLES for System Z
**Created:** [August 18, 2016, 2:39pm UTC](https://forums.suse.com/t/udev-rule-not-working/28539 "2016-08-18T14:39:23Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![toronf](https://avatars.discourse-cdn.com/v4/letter/t/e480ec/32.png) [@toronf](https://forums.suse.com/u/toronf)
#### Post date: [August 18, 2016, 2:39pm UTC](https://forums.suse.com/t/udev-rule-not-working/28539/1 "2016-08-18T14:39:23Z")

</div>

Hi,

i can’t get any script running with an udev rule.

I’ve created a rule called 80-test.rules in /etc/udev/rules.d  
ACTION=“add”, RUN\*="/tmp/test.sh" is the only content in this file.  
I want to run a script on every usb add action for all devices.

but nothing happens.

any idea how to solve this?

thanks

---

<div class="post-metadata">

### Author: ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)
#### Post date: [August 18, 2016, 3:17pm UTC](https://forums.suse.com/t/udev-rule-not-working/28539/2 "2016-08-18T15:17:05Z")

</div>

Hi  
Try adding;

```auto
ENV{DEVTYPE}=="usb_device", ACTION=="add", SUBSYSTEM=="usb", RUN+="/tmp/test.sh"
```

You need to use the command (after a rule change/edit);

```auto
udevadm trigger
```

Then monitor and see what is happening when the device is hot-plugged;

```auto
udevadm monitor
```

Are you really on a System Z?
