<commit_before>#!/bin/sh

DIR=$(pwd)

# PCSC-lite && ACS card reader driver
rc-update add pcscd default 
(
tar -C /usr/src -xvz -f $DIR/extras/acsccid-1.1.3.tar.gz 
cd /usr/src/acsccid-1.1.3 && ./bootstrap && ./configure && make && make install 
cp src/92_pcscd_acsccid.rules /etc/udev/rules.d 
cp $DIR/extras/Info.plist /usr/lib64/readers/usb/ifd-acsccid.bundle/Contents/Info.plist 
)

# HW random number generator support
rc-update add rngd default
cp $DIR/extras/rngd.conf /etc/conf.d/rngd
cp $DIR/extras/99_ldattach_rngd.rules /etc/udev/rules.d

# Luna SA client
rpm -i --nodeps $DIR/extras/luna/*.rpm

# configure Luna p2p network
(cd /etc/init.d ; test -h net.enp2s0 || ln -s net.lo net.enp2s0)
touch /etc/conf.d/net
grep -q config_enp2s0 /etc/conf.d/net || echo "config_enp2s0=\"10.0.0.2/255.255.255.0\"" >> /etc/conf.d/net
<commit_msg>create an empty /etc/Chrystoki.conf<commit_after>#!/bin/sh

DIR=$(pwd)

# PCSC-lite && ACS card reader driver
rc-update add pcscd default 
(
tar -C /usr/src -xvz -f $DIR/extras/acsccid-1.1.3.tar.gz 
cd /usr/src/acsccid-1.1.3 && ./bootstrap && ./configure && make && make install 
cp src/92_pcscd_acsccid.rules /etc/udev/rules.d 
cp $DIR/extras/Info.plist /usr/lib64/readers/usb/ifd-acsccid.bundle/Contents/Info.plist 
)

# HW random number generator support
rc-update add rngd default
cp $DIR/extras/rngd.conf /etc/conf.d/rngd
cp $DIR/extras/99_ldattach_rngd.rules /etc/udev/rules.d

# Luna SA client
rpm -i --nodeps $DIR/extras/luna/*.rpm
cat<<EOF>/etc/Chrystoki.conf
Chrystoki2 = {
   LibUNIX = /usr/lib/libCryptoki2.so;
   LibUNIX64 = /usr/lib/libCryptoki2_64.so;
}

Luna = {
  DefaultTimeOut = 500000;
  PEDTimeout1 = 100000;
  PEDTimeout2 = 200000;
  PEDTimeout3 = 10000;
  KeypairGenTimeOut = 2700000;
  CloningCommandTimeOut = 300000;
  CommandTimeOutPedSet = 720000;
}

LunaSA Client = {
   ReceiveTimeout = 20000;
   SSLConfigFile = /usr/safenet/lunaclient/bin/openssl.cnf;
   ClientPrivKeyFile = /usr/safenet/lunaclient/cert/client/ClientKey.pem;
   ClientCertFile = /usr/safenet/lunaclient/cert/client/Client.pem;
}

CardReader = {
  RemoteCommand = 1;
}

Misc = {
  PE1746Enabled = 0;
}
EOF

# configure Luna p2p network
(cd /etc/init.d ; test -h net.enp2s0 || ln -s net.lo net.enp2s0)
touch /etc/conf.d/net
grep -q config_enp2s0 /etc/conf.d/net || echo "config_enp2s0=\"10.0.0.2/255.255.255.0\"" >> /etc/conf.d/net

{'fraction_non_alphanumeric': 0.154365246731337, 'fraction_numerical': 0.05693800084352594, 'mean_word_length': 3.408921933085502, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1109480', 'n_tokens_mistral': 1129, 'n_tokens_neox': 1024, 'n_words': 189}