summaryrefslogtreecommitdiff
path: root/security/opencryptoki/files/patch-usr-sbin-pkcs11_startup-pkcs11_startup.in
blob: eab5c2b3b78a4222258214783bf9bbe23a1b4488 (plain) (blame)
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
--- usr/sbin/pkcs11_startup/pkcs11_startup.in.orig	2010-07-29 21:28:41.000000000 +0900
+++ usr/sbin/pkcs11_startup/pkcs11_startup.in	2010-10-22 00:57:35.508983672 +0900
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 #
 #
@@ -310,29 +310,20 @@
 
 
 # Create the pkcs11 group if it does not exist...
-cat /etc/group|grep pkcs11 >/dev/null 2>&1
+cat /etc/group|grep @PKCS11GROUP@ >/dev/null 2>&1
 rc=$?
 if [ $rc = 1 ]
 then
    if [ -x @GROUPADD@ ]
    then
-	   @GROUPADD@ pkcs11 >/dev/null 2>&1
+	   @GROUPADD@ @PKCS11GROUP@ >/dev/null 2>&1
 
    else
-	   echo "Couldn't execute @GROUPADD@. Please add the group 'pkcs11' manually."
+	   echo "Couldn't execute @GROUPADD@. Please add the group '@PKCS11GROUP@' manually."
    fi
 fi
 
 
-if [ -x @USERMOD@ -a -x @ID@ ]
-then
-	# add the pkcs group
-	# replace spaces by commas
-	@USERMOD@ -G $( @ID@ --groups --name root | @SED@ -e 'y/ /,/'),pkcs11  root
-else
-	echo "Couldn't execute @USERMOD@. Please add root to the group 'pkcs11' manually."
-fi
-
 
 # For each card run the status command and if successful
 # create the odm stanza for the file