File: enroll.sh.patch

package info (click to toggle)
osptoolkit 4.13.0-1.1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,376 kB
  • sloc: ansic: 42,300; makefile: 265; sh: 49
file content (45 lines) | stat: -rw-r--r-- 1,620 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Description: Changes for Debian osptoolkit package path.
Forwarded: not-needed
From: Di-Shi Sun <di-shi@transnexus.com>
Last-Update: 2017-02-13

--- a/bin/enroll.sh
+++ b/bin/enroll.sh
@@ -7,7 +7,9 @@
 #                                                                  #
 # This shell script is used to enroll the device with the Server   #
 ####################################################################
-OPENSSL_CONF=./openssl.cnf
+ospdir=/usr/lib/osp
+cnfdir=/etc/osp
+OPENSSL_CONF=$cnfdir/openssl.cnf
 export OPENSSL_CONF
 RANDFILE=./.rnd
 export RANDFILE
@@ -26,7 +28,7 @@
 exit 127
 fi
 
-enroll -function getcacert -caurl http://$1:5045/tep > cacert_0.pem
+$ospdir/enroll -function getcacert -caurl http://$1:5045/tep > cacert_0.pem
 ret_val=$?
 export ret_val
 echo "[SP: $1]Error Code returned from getcacert command :" $ret_val
@@ -35,7 +37,7 @@
 exit 127
 fi
 
-enroll -function request -username trans -password nexus -customer 1000 -device 1000 -cacert cacert_0.pem -certreq certreq.pem -sslurl https://$1:1443/tep > localcert.pem
+$ospdir/enroll -function request -username trans -password nexus -customer 1000 -device 1000 -cacert cacert_0.pem -certreq certreq.pem -sslurl https://$1:1443/tep > localcert.pem
 ret_val=$?
 export ret_val
 echo "Error Code returned from localcert command :" $ret_val
@@ -47,7 +49,7 @@
 i=1
 shift
 while [ $# -ge 1 ]; do
-enroll -function getcacert -caurl http://$1:5045/tep > cacert_$i.pem
+$ospdir/enroll -function getcacert -caurl http://$1:5045/tep > cacert_$i.pem
 ret_val=$?
 export ret_val
 echo "[SP: $1]Error Code returned from getcacert command :" $ret_val