security sticker™
This commit is contained in:
30
start_dialog
30
start_dialog
@@ -343,12 +343,36 @@ function askReg() {
|
||||
|
||||
}
|
||||
|
||||
function enterSecurityCode() {
|
||||
MAXLENGTH=6
|
||||
|
||||
askStr ${MAXLENGTH} "Security code" "Enter security code from the security sticker (e.g. S12345)."
|
||||
if [ $? -eq 1 ]; then
|
||||
return 1
|
||||
fi
|
||||
SECURITYCODE=$(cat $TMP)
|
||||
confirm "Security code" "$SECURITYCODE"
|
||||
return $?
|
||||
|
||||
}
|
||||
|
||||
function printSecurePassport(){
|
||||
checkLockFile
|
||||
diaBox "Insert Passport" "Please insert passport (Visas) into the printer.\nA print on EVERY Visa page is necessary."
|
||||
|
||||
cd "$1"
|
||||
./secure "$SECURITYCODE"
|
||||
cd ..
|
||||
rm $LOCKFILE
|
||||
}
|
||||
|
||||
function menuFor() {
|
||||
dialog --backtitle "$BT" \
|
||||
--menu "Select purpose:" 14 40 3 \
|
||||
1 "Registration" \
|
||||
2 "c3gov Stamp" \
|
||||
3 "GPG" \
|
||||
8 "Secure Passport" \
|
||||
9 "Back" 2> $TMP
|
||||
|
||||
choice=$(cat $TMP)
|
||||
@@ -372,6 +396,11 @@ function menuFor() {
|
||||
printGPG "$1"
|
||||
fi
|
||||
;;
|
||||
4) enterSecurityCode
|
||||
if [ $? -eq 0 ]; then
|
||||
printSecurePassport "$1"
|
||||
fi
|
||||
;;
|
||||
|
||||
esac
|
||||
unset FNAME
|
||||
@@ -380,6 +409,7 @@ function menuFor() {
|
||||
unset FP
|
||||
unset FIELD
|
||||
unset FFP
|
||||
unset SECURITYCODE
|
||||
}
|
||||
|
||||
function askForFunnyUserCreds() {
|
||||
|
||||
Reference in New Issue
Block a user