]> git.sur5r.net Git - bacula/bacula/blob - bacula/examples/local_partitions
Make out of freespace non-fatal for removable devices -- i.e. behaves like tape
[bacula/bacula] / bacula / examples / local_partitions
1 #!/bin/sh
2 #
3 # A script to extract the local, permanently mounted, real, filesystems.
4 # Tested on Solaris, Linux, IRIX
5 #
6 # Written by: Peter Eriksson <pen@lysator.liu.se> 2004-12-13
7 #
8
9 PATH=/bin:/usr/bin:/sbin:/usr/sbin
10 export PATH
11
12 if [ -f /etc/fstab ]; then
13     awk '($1 ~ /^\/dev/ && $2 ~ /^\// && $4 !~ /noauto/) {print $2}' </etc/fstab | sort
14 elif [ -f /etc/vfstab ]; then
15     awk '($1 ~ /^\/dev/ && $2 ~ /^\/dev/ && $3 ~ /^\//) { print $3 }' </etc/vfstab | sort
16 else
17     echo 'ERROR: Can not find /etc/fstab or /etc/vfstab' >&2
18     exit 1
19 fi
20
21 exit 0