-# duplicated in brc2
-bum() {
- local cur host
- host=$1
- (( $# == 1 )) || return 1
- cur="$(awk '$2 == "/bu/mnt" {print $1}' /proc/mounts)"
- if [[ $cur ]]; then
- if [[ $cur == "$host:/bu/md" ]]; then
- return 0
- else
- fusermount -u /bu/mnt
- fi
- fi
- m sshfs bu@$host:/bu/home/md /bu/mnt -o reconnect,ServerAliveInterval=20,ServerAliveCountMax=30 -o allow_other
-}
-bu() {
- if mountpoint -q /bu/mnt; then
- if ! timeout -s 9 10 fusermount -u /bu/mnt; then
- fusermount -zu /bu/mnt
- fi
- fi
-}
-
-case $HOSTNAME in
- $MAIL_HOST)
- case $HOSTNAME in
- kw) bum x3 ;;
- x3) bum kw ;;
- kd|sy) bum x2 ;;
- x2) bum kd ;;
- esac
- ;;
- *)
- bu
- ;;
-esac
-
-