File: doit.sh

package info (click to toggle)
unionfs 1.4%2Bdebian-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 924 kB
  • ctags: 929
  • sloc: ansic: 9,905; sh: 2,787; makefile: 253; perl: 200
file content (47 lines) | stat: -rwxr-xr-x 794 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash -norc
set -x
PATH=/sbin:.:${PATH}
export PATH

BRANCHES=/branch0:/branch1
MOUNTPOINT=/mnt/unionfs
DEBUG=18
EXTRAMOUNT=
INSMOD=insmod
IMAP=

if [ -f doitopts ] ; then
	source ./doitopts
fi
if [ -f doitopts.`uname -n` ] ; then
	source ./doitopts.`uname -n`
fi

lsmod
if [ -f ./unionfs.ko ] ; then
	$INSMOD ./unionfs.ko || exit
elif [ -f ./unionfs.o ] ; then
	$INSMOD ./unionfs.o || exit
else
	echo "Can not find unionfs object file."
	exit
fi
lsmod

if [ "$NOPAUSE" != "1" ] ; then
	echo "Press enter to continue: "
	read n
fi


# regular style mount
mount -t unionfs -o debug=${1:-$DEBUG},dirs=${BRANCHES}${EXTRAMOUNT}${IMAP} none ${MOUNTPOINT} || exit $?

if [ -f postdoit ] ; then
	source ./postdoit
fi
if [ -f postdoit.`uname -n` ] ; then
	source ./postdoit.`uname -n`
fi

exit 0