2010-04-13 21:36:53 +02:00
|
|
|
#!/bin/bash
|
2009-02-20 01:02:26 +01:00
|
|
|
|
2010-04-13 21:36:53 +02:00
|
|
|
CMD="${0##*/}"
|
2009-02-20 01:02:26 +01:00
|
|
|
|
|
|
|
if [[ "$CMD" =~ "umount" ]]; then
|
2010-08-27 17:19:13 +02:00
|
|
|
if [ ! -x /usr/sbin/umount.crypt ]; then
|
2009-02-20 01:02:26 +01:00
|
|
|
logger -t "mount.crypt" -p user.err -i "/usr/sbin/umount.crypt: File not found."
|
|
|
|
exit 1
|
|
|
|
fi
|
2010-08-27 17:19:13 +02:00
|
|
|
/usr/sbin/umount.crypt "$@"
|
2009-02-20 01:02:26 +01:00
|
|
|
elif [[ "$CMD" =~ "mount" ]]; then
|
2010-08-27 17:19:13 +02:00
|
|
|
if [ ! -x /usr/sbin/mount.crypt ]; then
|
2009-02-20 01:02:26 +01:00
|
|
|
logger -t "mount.crypt" -p user.err -i "/usr/sbin/mount.crypt: File not found."
|
|
|
|
exit 1
|
|
|
|
fi
|
2010-08-27 17:19:13 +02:00
|
|
|
/usr/sbin/mount.crypt "$@"
|
2009-02-20 01:02:26 +01:00
|
|
|
else
|
|
|
|
logger -t "mount.crypt" -p user.err -i "Unknown command: $0"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|