I presume that the one line code is your my_command script.
As it is of the form :
command1 && command2 && command3 && ...
if one of the command fails the others will not be executed.
So maybe, when your script is launched by udev, that is what happens.
To know if it is the case and what command fails, you can modify your script like that :
Code:
if ! command1;then
echo "Error executing command1 whith error $?" > logfilename
exit
fi
if ! command2;then
echo "Error executing command2 whith error $?" >> logfilename
exit
fi
...
Or redirecting the standard output and standard error of the commands :
Code:
echo "Executing command1" > logfilename
if ! command1 &>> logfilename;then
echo "Error executing command1 whith error $?" >> logfilename
exit
fi
echo "Executing command2" >> logfilename
if ! command2 &>> logfilename;then
echo "Error executing command2 whith error $?" >> logfilename
exit
fi
...
So you will see what happens when udev runs the script.