@@ -27,7 +27,7 @@ pot-snapshot()
27
27
case " $_o " in
28
28
h)
29
29
snapshot-help
30
- ${EXIT} 0
30
+ return 0
31
31
;;
32
32
v)
33
33
_POT_VERBOSITY=$(( _POT_VERBOSITY + 1 ))
@@ -48,7 +48,7 @@ pot-snapshot()
48
48
else
49
49
_error " -p|-f are exclusive"
50
50
snapshot-help
51
- ${EXIT} 1
51
+ return 1
52
52
fi
53
53
;;
54
54
f)
@@ -58,7 +58,7 @@ pot-snapshot()
58
58
else
59
59
_error " -p|-f are exclusive"
60
60
snapshot-help
61
- ${EXIT} 1
61
+ return 1
62
62
fi
63
63
;;
64
64
n)
@@ -69,37 +69,37 @@ pot-snapshot()
69
69
;;
70
70
* )
71
71
snapshot-help
72
- ${EXIT} 1
72
+ return 1
73
73
;;
74
74
esac
75
75
done
76
76
if [ -z " $_obj " ]; then
77
77
_error " one of -p|-f has to be used"
78
78
snapshot-help
79
- $EXIT 1
79
+ return 1
80
80
fi
81
81
if [ -z " $_objname " ]; then
82
82
_error " -p|-f options need an argument"
83
83
snapshot-help
84
- ${EXIT} 1
84
+ return 1
85
85
fi
86
86
case $_obj in
87
87
" pot" )
88
88
if [ -n " $_snapname " ]; then
89
89
_error " Option -n usable only with fscomp"
90
- ${EXIT} 1
90
+ return 1
91
91
fi
92
92
if ! _is_pot " $_objname " ; then
93
93
_error " $_objname is not a pot!"
94
94
snapshot-help
95
- ${EXIT} 1
95
+ return 1
96
96
fi
97
97
if _is_pot_running " $_objname " ; then
98
98
_error " The pot $_objname is still running. Snapshot is possible only for stopped pots"
99
- ${EXIT} 1
99
+ return 1
100
100
fi
101
101
if ! _is_uid0 ; then
102
- ${EXIT} 1
102
+ return 1
103
103
fi
104
104
105
105
if [ " $_full_pot " = " YES" ]; then
@@ -115,13 +115,13 @@ pot-snapshot()
115
115
if ! _zfs_exist " ${POT_ZFS_ROOT} /fscomp/$_objname " " ${POT_FS_ROOT} /fscomp/$_objname " ; then
116
116
_error " $_objname is not a valid fscomp"
117
117
snapshot-help
118
- ${EXIT} 1
118
+ return 1
119
119
fi
120
120
if [ " $_full_pot " = " YES" ]; then
121
121
_info " -a option is incompatible with -f. Ignored"
122
122
fi
123
123
if ! _is_uid0 ; then
124
- ${EXIT} 1
124
+ return 1
125
125
fi
126
126
if [ " $_replace " = " YES" ]; then
127
127
_remove_oldest_fscomp_snap " $_objname "
0 commit comments