extrahd: add forgotten udev_event handler to mount partitions via udev
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
parent
7f782be5e3
commit
90147c2c33
|
@ -116,7 +116,21 @@ extrahd_umount() {
|
|||
done < /var/ipfire/extrahd/devices
|
||||
}
|
||||
|
||||
handle_udev_event() {
|
||||
case "${ACTION}" in
|
||||
add)
|
||||
if [ -n "${ID_FS_UUID}" ]; then
|
||||
extrahd_mount "UUID=${ID_FS_UUID}" || return $?
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
main() {
|
||||
( echo "$@"; set ) > /tmp/extrahd.$$
|
||||
|
||||
local command="${1}"
|
||||
shift
|
||||
|
||||
|
@ -129,6 +143,9 @@ main() {
|
|||
umount)
|
||||
extrahd_umount "${@}" || rc="${rc}"
|
||||
;;
|
||||
udev-event)
|
||||
handle_udev_event "${@}" || rc="${rc}"
|
||||
;;
|
||||
scanhd)
|
||||
exec /usr/local/bin/scanhd "${@}"
|
||||
;;
|
||||
|
|
Loading…
Reference in New Issue