|
@@ -27,14 +27,26 @@ fi
|
27
|
27
|
function zRun() {
|
28
|
28
|
if [ ! $(echo $USER|grep root|wc -m) = 0 ]
|
29
|
29
|
then
|
30
|
|
- if [ $(cat $MODE |grep mode|grep -v '#'|sed 's/\mode=//g'|sed 's/\"//g;s/\;//g'|grep auto|wc -m) == 0 ]
|
|
30
|
+ if [ $(cat $MODE |grep mode|grep -v '#'|sed 's/\mode=//g'|sed 's/\"//g;s/\;//g'|grep auto|wc -m) == 0 ]
|
31
|
31
|
then
|
32
|
32
|
echo "$(date) $NAME: no autostart from boot! mode=manual - /etc/defaults/zramraid">>/var/log/zramraid.log
|
33
|
33
|
exit 0;
|
34
|
34
|
else
|
35
|
|
- $ZPATH/$SCRIPTNAME --on
|
36
|
|
- fi
|
37
|
|
- exit 0;
|
|
35
|
+ $ZPATH/$SCRIPTNAME --on
|
|
36
|
+ fi
|
|
37
|
+ exit 0;
|
|
38
|
+fi
|
|
39
|
+
|
|
40
|
+if [ ! $(echo $USER|grep '[priv]'|wc -m) = 0 ]
|
|
41
|
+ then
|
|
42
|
+ if [ $(cat $MODE |grep mode|grep -v '#'|sed 's/\mode=//g'|sed 's/\"//g;s/\;//g'|grep auto|wc -m) == 0 ]
|
|
43
|
+ then
|
|
44
|
+ echo "$(date) $NAME: no autostart from boot! mode=manual - /etc/defaults/zramraid">>/var/log/zramraid.log
|
|
45
|
+ exit 0;
|
|
46
|
+ else
|
|
47
|
+ $ZPATH/$SCRIPTNAME --on
|
|
48
|
+ fi
|
|
49
|
+ exit 0;
|
38
|
50
|
fi
|
39
|
51
|
echo "$NAME:Sorry.. The only root privileges!"
|
40
|
52
|
exit 0;
|