MacOSX (un)install: use /usr/local/libexec/... on El Capitan
For Mac OS X El Capitan 10.11 it is no more possible to add files in /usr/libexec/SmartCardServices/drivers/. Third party smart card drivers must use /usr/local/libexec/SmartCardServices/drivers/ instead.
This commit is contained in:
@@ -1,7 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir -p /usr/libexec/SmartCardServices/drivers
|
||||
ln -sf /Library/VirtualSmartCard/usr/libexec/SmartCardServices/drivers/ifd-vpcd.bundle /usr/libexec/SmartCardServices/drivers
|
||||
# get the Mac OS X major version. Example: El Capitan 10.11 -> 10011
|
||||
MAC_VERSION=$(sw_vers -productVersion | awk -F '.' '{print $1 * 1000 + $2}')
|
||||
|
||||
if [ 10011 -gt $MAC_VERSION ]
|
||||
then
|
||||
# Mac OS X < 10.11
|
||||
DROPDIR="/usr/libexec/SmartCardServices/drivers"
|
||||
else
|
||||
# Mac OS X >= 10.11 (El Capitan)
|
||||
DROPDIR="/usr/local/libexec/SmartCardServices/drivers"
|
||||
fi
|
||||
|
||||
mkdir -p $DROPDIR
|
||||
ln -sf /Library/VirtualSmartCard/usr/libexec/SmartCardServices/drivers/ifd-vpcd.bundle $DROPDIR
|
||||
|
||||
for f in /Library/VirtualSmartCard/bin/*
|
||||
do
|
||||
|
||||
@@ -1,10 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -L "/usr/libexec/SmartCardServices/drivers/ifd-vpcd.bundle" ]
|
||||
# get the Mac OS X major version. Example: El Capitan 10.11 -> 10011
|
||||
MAC_VERSION=$(sw_vers -productVersion | awk -F '.' '{print $1 * 1000 + $2}')
|
||||
|
||||
if [ 10011 -gt $MAC_VERSION ]
|
||||
then
|
||||
if [ "$(readlink /usr/libexec/SmartCardServices/drivers/ifd-vpcd.bundle)" == "/Library/VirtualSmartCard/usr/libexec/SmartCardServices/drivers/ifd-vpcd.bundle" ]
|
||||
# Mac OS X < 10.11
|
||||
DROPDIR="/usr/libexec/SmartCardServices/drivers"
|
||||
else
|
||||
# Mac OS X >= 10.11 (El Capitan)
|
||||
DROPDIR="/usr/local/libexec/SmartCardServices/drivers"
|
||||
fi
|
||||
|
||||
if [ -L "$DROPDIR" ]
|
||||
then
|
||||
if [ "$(readlink $DROPDIR)" == "/Library/VirtualSmartCard/usr/libexec/SmartCardServices/drivers/ifd-vpcd.bundle" ]
|
||||
then
|
||||
rm /usr/libexec/SmartCardServices/drivers/ifd-vpcd.bundle
|
||||
rm $DROPDIR
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user