File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,6 @@ for sudo_cmd in "kdesu" "gksu" "pkexec"; do
12
12
fi
13
13
done
14
14
15
- cmd_exists () {
16
- type " $1 " & > /dev/null;
17
- }
18
-
19
-
20
15
export PATH=$PATH :/sbin/
21
16
if cmd_exists update-ca-certificates; then
22
17
ca_path=/usr/local/share/ca-certificates/
@@ -37,8 +32,18 @@ $su_graph $ca_update_cmd
37
32
# Alway run install, it does not hurt
38
33
39
34
if cmd_exists apt-get; then
35
+ DBDIR=" $HOME /.pki/nssdb"
40
36
$su_graph apt-get install libnss3-tools
41
- certutil -d sql:$HOME /.pki/nssdb -A -t " C,," -n Arduino -i $1
37
+
38
+ # if the dir does not exists, created the cert db
39
+ stat $DBDIR
40
+ if [ " $? " -ne " 0" ]; then
41
+ mkdir -p $DBDIR
42
+ certutil -d sql:$DBDIR -N
43
+ fi
44
+
45
+ certutil -d sql:$DBDIR -A -t " C,," -n Arduino -i $1
42
46
fi
43
47
exit $?
44
48
49
+
You can’t perform that action at this time.
0 commit comments