auto-import esc-1.0.0-13 on branch devel from esc-1.0.0-13.src.rpm

This commit is contained in:
Jack Magne 2006-09-23 01:08:13 +00:00
parent 1aa8113cbd
commit a72112b7c0
2 changed files with 91 additions and 7 deletions

88
esc
View File

@ -1,11 +1,87 @@
#!/bin/sh
export NSPR_LOG_MODULES=tray:2,coolKeyLib:2,coolKey:2,coolKeyNSS:2,coolKeySmart:2,coolKeyHandler:2
if [ ! -d ~/.redhat/esc ]
ESC_PROFILE_BASE=~/.redhat/esc
ESC_LOG_FILE=esc.log
ESC_PATH=$LIBDIR/esc-1.0.0
ESC_BIN_PATH=/usr/bin
ESC_EXEC=esc
ESCD_EXEC=escd
ESC_BIN=$ESC_PATH/xulrunner/xulrunner-bin
ESCD_BIN=./$ESCD_EXEC
LAST_PROG_PID=0
SIGUSR1=10
FORCE_START_ESC=$1
XPTI_DAT=xpti.dat
COMPREG_DAT=compreg.dat
function isProgRunning {
userID=$(whoami)
isProgRunning=$(pgrep -U $userID -f $1)
if [ $isProgRunning ];
then
LAST_PROG_PID=$isProgRunning
return 0
fi
LAST_PROG_PID=0
return 1
}
function removeFile {
if [ -w $1 ]
then
rm -f $1
fi
}
export NSPR_LOG_MODULES=tray:2,coolKeyLib:2,coolKey:2,coolKeyNSS:2,coolKeySmart:2,coolKeyHandler:2,escDLog:5
if [ ! -d $ESC_PROFILE_BASE ]
then
mkdir -p ~/.redhat/esc
mkdir -p $ESC_PROFILE_BASE
fi
export NSPR_LOG_FILE=$ESC_PROFILE_BASE/$ESC_LOG_FILE
cd $ESC_PATH
isProgRunning $ESC_BIN
if [ $LAST_PROG_PID -gt 0 ]
then
./$ESC_EXEC
exit 0
fi
export NSPR_LOG_FILE=~/.redhat/esc/esc.log
cd $LIBDIR/esc-1.0.0
./esc
if [ $FORCE_START_ESC ]
then
./$ESC_EXEC
exit 0
fi
isProgRunning $ESCD_BIN
if [ $LAST_PROG_PID -gt 0 ]
then
kill -$SIGUSR1 $LAST_PROG_PID
else
removeFile $ESC_PROFILE_BASE/*default/$XPTI_DAT
removeFile $ESC_PROFILE_BASE/*default/$COMPREG_DAT
./$ESCD_EXEC --key_Inserted=\"/usr/bin/esc\" --on_Signal=\"/usr/bin/esc\"
fi
exit 0

View File

@ -1,6 +1,6 @@
Name: esc
Version: 1.0.0
Release: 12%{?dist}
Release: 13%{?dist}
Summary: Enterprise Security Client Smart Card Client
License: GPL
URL: http://directory.fedora.redhat.com/wiki/CoolKey
@ -19,6 +19,8 @@ Patch8: esc-1.0.0-strings-fix.patch
Patch11: esc-1.0.0.strings-1-fix.patch
Patch12: esc-1.0.0-ui-enhance-1.patch
Patch13: esc-1.0.0-pw-reset-fix.patch
Patch14: esc-1.0.0-escd.patch
Patch15: esc-1.0.0-escd1.patch
BuildRequires: doxygen fontconfig-devel freetype-devel >= 2.1
BuildRequires: glib2-devel libIDL-devel atk-devel gtk2-devel libjpeg-devel
@ -76,6 +78,8 @@ cryptographic smartcards.
%patch11 -p1 -b .fix11
%patch12 -p1 -b .fix12
%patch13 -p1 -b .fix13
%patch14 -p1 -b .fix14
%patch15 -p1 -b .fix15
#Unpack xulrunner where esc expects it to be.
@ -151,6 +155,7 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root,-)
%{escdir}/esc
%{escdir}/escd
%{escbindir}/esc
%{escdir}/application.ini
@ -183,6 +188,9 @@ if [ -x %{_bindir}/gtk-update-icon-cache ]; then
fi
%changelog
* Fri Sep 22 2006 Jack Magne <jmagne@redhat.com>- 1.0.0-13
- Fix to include the new esc daemon.
* Sat Sep 16 2006 Jack Magne <jmagne@redhat.com>- 1.0.0-12
- Fix for Password Reset and minor UI revision.