K
K
KinRovtaz2018-12-27 13:49:31
linux
KinRovtaz, 2018-12-27 13:49:31

UDEV, why doesn't the script work in the rules?

Hello there is a rule.
Which fulfills at connection of the certain carrier.
The rule works exactly (put a stub for creating a text file),
the script, if run by hand, also works,
the script does not work out from under the rule.
here is the rule
KERNEL=="sd?1", ATTRS{serial}=="ff540000.usb", ATTRS{idVendor}=="104b", ATTRS{idProduct}=="0002", ACTION=="add", RUN+=" /bin/sh /home/linaro/sc/aw.sh"
here is the script
#!/bin/bash
sleep 5
sudo mv /media/linaro/DC8A-BBAE/* /mnt/yandex.disk/test2
sleep 10
sudo find /mnt/yandex.disk/test -name "*.zip" -exec mv '{}' /media/linaro/DC8A-BBAE \;
CHANTD?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Sakhno, 2018-12-27
@Punk_Joker

For all utilities, specify absolute paths, or add the directories where they are located in the overwritten environments at the beginning of the script

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question