-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathghostfs_mount
More file actions
executable file
·56 lines (44 loc) · 891 Bytes
/
ghostfs_mount
File metadata and controls
executable file
·56 lines (44 loc) · 891 Bytes
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
48
49
50
51
52
53
54
55
56
#!/bin/bash
# Old Author: Péricles Lopes Machado (eu[at]gogo40.com)
# Author: Ricardo Biehl Pasquali <rbpoficial@gmail.com>
script_name="ghostfs_mount"
function print_usage() {
echo "Usage: $script_name [OPTIONS] <mount_point>"
exit 1
}
function print_help {
echo "$script_name -- Mount util for GhostFS"
echo
echo " usage: $script_name [OPTIONS] <mount_point>"
echo
echo " --help|-h Show this help."
echo " --debug|-d Active debug mode."
echo
echo "License: GNU/GPL (See COPYING); Author: Raphael S. Carvalho"
exit 0
}
unset opt_arg
while [ 0 ]; do
case "$1" in
"--help"|"-h")
print_help
;;
"--debug"|"-d")
opt_arg="$opt_arg -d"
;;
*)
break
;;
esac
shift
done
if [ -z "$1" ]; then
echo "No mount_point!"
print_usage
fi
if [ ! -d "$1" ]; then
echo "\"$1\" is not a directory!"
print_usage
fi
mount_point="$1"
ghostfs $mount_point $opt_arg