2 Commits

Author SHA1 Message Date
  Yann Weber 11b3545dfb First version of scripts 3 months ago
  Yann Weber e196f9b66b First version of scripts 3 months ago
2 changed files with 5 additions and 7 deletions
  1. 3
    5
      scripts/checkconfig.sh
  2. 2
    2
      scripts/upgrade.sh

+ 3
- 5
scripts/checkconfig.sh View File

@@ -9,12 +9,10 @@ fi
9 9
 config=$1
10 10
 err=0
11 11
 
12
-while read rule
12
+while read -r rule
13 13
 do
14
-	opt="$(echo $rule | cut -d ":" -f 1)"
15
-	comment="$(echo $rule | cut -d ":" -f 2-)"
16
-	#echo "opt='$opt'"
17
-	#echo "comment='$comment'"
14
+	opt="$(echo "$rule" | cut -d ":" -f 1)"
15
+	comment="$(echo "$rule" | cut -d ":" -f 2-)"
18 16
 	printf "%-40s" "$opt"
19 17
 	if grep "$opt" "$config" >/dev/null
20 18
 	then

+ 2
- 2
scripts/upgrade.sh View File

@@ -1,13 +1,13 @@
1 1
 #!/bin/sh
2 2
 set -e
3 3
 
4
-src_tarball=$(ls /usr/src/linux-source-* |sort -V | tail  -n1)
4
+src_tarball=$(find /usr/src/linux-source-* |sort -V | tail  -n1)
5 5
 version=$(basename "$src_tarball" |sed -e 's/^linux-source-//' -e 's/\.tar\.xz//')
6 6
 tarball_hash=.debian_src_tarball.sha512
7 7
 
8 8
 src_dir=$(realpath linux-source)
9 9
 
10
-if [ -d "$src_dir" -a -L "linux-source" ]
10
+if [ -d "$src_dir" ] && [ -L "linux-source" ]
11 11
 then
12 12
 	if sha512sum -c "$tarball_hash"
13 13
 	then

Loading…
Cancel
Save