jehanne/arch/amd64/bin/auth/status
Giacomo Tesio fc42b02a28 Add arch/amd64
PRO MEMORIA: in arch/amd64/include/ureg.h the commented registers are preserved.

They were removed at 6ab2e16c9f
but apparently the es register is used by vesavga (386 version) in both Plan9, 9front and 9atom.
2015-12-22 11:40:34 +00:00

37 lines
738 B
Bash
Executable File

#!/bin/rc
cd /mnt/keys/$1 > /dev/null >[2=1] && {
stat=`{cat status}
exp=`{cat expire}
switch($exp){
case never 0
exp='never expires'
case *
exp=(expires on `{date $exp})
}
switch($stat){
case expired
echo user $1: plan 9 key has expired
case *
echo user $1: plan 9 key status is $stat and $exp
}
grep '^'$1'[ ]' /adm/keys.who | tail -1
}
cd /mnt/netkeys/$1 > /dev/null >[2=1] && {
stat=`{cat status}
exp=`{cat expire}
switch($exp){
case never 0
exp='never expires'
case *
exp=(expires on `{date $exp})
}
switch($stat){
case expired
echo user $1: network key has expired
case *
echo user $1: network key status is $stat and $exp
auth/printnetkey $1
}
grep '^'$1'[ ]' /adm/netkeys.who | tail -1
}