Browse Source

update for Linux Debian 10 03.03.21:18.21

root 3 years ago
parent
commit
0375d21e2f

+ 16 - 4
zramraid.deb/etc/init.d/zramraid-manager

@@ -27,14 +27,26 @@ fi
27
 function zRun() {
27
 function zRun() {
28
 if [ ! $(echo $USER|grep root|wc -m) = 0 ]
28
 if [ ! $(echo $USER|grep root|wc -m) = 0 ]
29
     then
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
 	then
31
 	then
32
 	    echo "$(date) $NAME: no autostart from boot! mode=manual - /etc/defaults/zramraid">>/var/log/zramraid.log
32
 	    echo "$(date) $NAME: no autostart from boot! mode=manual - /etc/defaults/zramraid">>/var/log/zramraid.log
33
 	    exit 0;
33
 	    exit 0;
34
 	else
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
 fi
50
 fi
39
 echo "$NAME:Sorry.. The only root privileges!"
51
 echo "$NAME:Sorry.. The only root privileges!"
40
 exit 0;
52
 exit 0;

+ 1 - 1
zramraid.deb/etc/zramraid/zramraid-maker

@@ -7,7 +7,7 @@
7
 option=$1;
7
 option=$1;
8
 params=$2;
8
 params=$2;
9
 PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/etc/zramraid";
9
 PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/etc/zramraid";
10
-version="10.03.18";
10
+version="03.02.21";
11
 ## msg [53]
11
 ## msg [53]
12
 set_msg=( '"0" "1"' '"1" "1"' '"2" "1"' '"3" "1"' '"4" "1"' '"5" "1"' '"6" "1"' '"7" "1"' '"8" "1"' 
12
 set_msg=( '"0" "1"' '"1" "1"' '"2" "1"' '"3" "1"' '"4" "1"' '"5" "1"' '"6" "1"' '"7" "1"' '"8" "1"' 
13
         '"9" "1"' '"10" "1"' '"11" "1"' '"12" "1"'  '"13" "1"' '"14" "1"' '"15" "1"' '"16" "1"' 
13
         '"9" "1"' '"10" "1"' '"11" "1"' '"12" "1"'  '"13" "1"' '"14" "1"' '"15" "1"' '"16" "1"' 

+ 2 - 2
zramraid.deb/zramraid-install

@@ -2,7 +2,7 @@
2
 ## zramraid-install (Default for Debian & Ubuntu)
2
 ## zramraid-install (Default for Debian & Ubuntu)
3
 ## (c) author's idea and realization: Kleemov A. & Koshuba V.
3
 ## (c) author's idea and realization: Kleemov A. & Koshuba V.
4
 ## script author: Koshuba V - stvixfree@gmail.com
4
 ## script author: Koshuba V - stvixfree@gmail.com
5
-## version = 26.06.18
5
+## version = 03.02.21
6
 ## License: GPLv3
6
 ## License: GPLv3
7
 option=$1;
7
 option=$1;
8
 rdate=$(date +%c);
8
 rdate=$(date +%c);
@@ -152,7 +152,7 @@ ln -s /etc/zramraid/zramraid-config /usr/local/bin/zramraid-config;
152
 
152
 
153
 if [[ $deb_release < 8 ]]; 
153
 if [[ $deb_release < 8 ]]; 
154
      then
154
      then
155
-	update-rc.d -n zramraid-manager defaults;
155
+	update-rc.d zramraid-manager defaults;
156
      else
156
      else
157
 	cp -f $PWD/lib/systemd/system/zramraid.service /lib/systemd/system/zramraid.service;
157
 	cp -f $PWD/lib/systemd/system/zramraid.service /lib/systemd/system/zramraid.service;
158
 	/bin/systemctl enable zramraid.service;
158
 	/bin/systemctl enable zramraid.service;