make getpeername() return the original socket address which before it was intercepted
[hband-tools.git] / user-tools / override / mount
blobbe274f5bfc2c19009dfda470d2ad6ce9abb63cdd
1 #!/bin/bash
3 # mount(8) accepts relative paths in fstab,
4 # so in your private ~/.fstab, you only need to point to your mount sources and targets as paths relative to your $HOME dir.
6 cd || exit $?
8 try_homefstab=yes
10 for arg in "$@"
12 if [ ".$arg" = .--fstab ]
13 then
14 try_homefstab=no
15 break
17 done
19 if [ $try_homefstab = yes -a -e ~/.fstab ]
20 then
21 /bin/mount --fstab ~/.fstab "$@"
22 err=$?
24 if [ "$err" = 0 ]
25 then
26 exit 0
27 else
28 echo "trying system fstab" >&2
32 exec /bin/mount "$@"