1 2
SUBSYSTEM=="extcon", ATTR{state}=="USB=1", RUN+="/usr/bin/sdb-mode.sh --on" SUBSYSTEM=="extcon", ATTR{state}=="USB=0", RUN+="/usr/bin/sdb-mode.sh --off"