Skip to content

Commit

Permalink
Make udev rule more specific and export PATH prior to calling which
Browse files Browse the repository at this point in the history
  • Loading branch information
EtiennePerot committed Sep 2, 2013
1 parent 9405f8c commit d954043
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions functions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
programExists() {
export PATH
which "$1" &> /dev/null
return "$?"
}
Expand Down
2 changes: 1 addition & 1 deletion install-udev-rules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ echo '# As such, any changes you make here will be overwritten during the next r
echo '' >> "$output_rule" # Empty line
for device in "${!macAddresses[@]}"; do
echo "# macchiato-data: $device = ${macAddresses[$device]}" >> "$output_rule"
echo "ACTION==\"add\", ATTR{address}==\"${macAddresses[$device]}\", RUN+=\"$bash_bin '$macchiato_bin' '$confDir' '$device'\"" >> "$output_rule"
echo "ACTION==\"add\", SUBSYSTEM==\"net\", ATTR{address}==\"${macAddresses[$device]}\", RUN+=\"$bash_bin '$macchiato_bin' '$confDir' '$device'\"" >> "$output_rule"
echo '' >> "$output_rule" # Empty line
done
echo "All done. udev rules have been written to '$output_rule'"

0 comments on commit d954043

Please sign in to comment.