Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ubergeek42 committed Mar 20, 2023
1 parent 2c44c3b commit ab694c7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
5 changes: 4 additions & 1 deletion fetch-secrets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ cp secrets/$1/[email protected] files/secrets/
# and private key + ca certificate signature
cp secrets/$1/icpcadmin@contestmanager{,-cert.pub} files/secrets/

# copy public+private host key (and ca certificate signature)
# copy public+private host key for the contestant machines (and ca certificate signature)
cp secrets/$1/contestant.icpcnet.internal_host_ed25519_key{,.pub,-cert.pub} files/secrets/

# copy public+private host key for the management machine (and ca certificate signature)
cp secrets/$1/contestmanager.icpcnet.internal_host_ed25519_key{,.pub,-cert.pub} files/secrets/

# copy public ca
cp secrets/$1/server_ca.pub files/secrets/
echo "done!"
9 changes: 7 additions & 2 deletions files/scripts/pcpr
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,12 @@ macAddress = subprocess.getoutput("cat /sys/class/net/" + netDevice + "/address"
hostname = subprocess.getoutput("hostname")

# -MLetter we assume US printers and generate letter size pages and not A4 pages
options = "-MLetter -2 --landscape --pretty-print "
options = [
"-MLetter",
"-2",
"--landscape",
"--pretty-print"
]

# The header is too wide, but footers are a pain
header = "$n; page $% of $=; time=$C; user=$(USER); site=" + site + "; team=" + team + "; host=" + hostname + "; mac=" + macAddress
Expand All @@ -68,6 +73,6 @@ header = "$n; page $% of $=; team=" + team

# Though I encourage just one argument (the name of one file);
# all command line arguments are tacked on at the end
os.system("/usr/bin/enscript " + options + " '--header=" + header + "' " + ' '.join(sys.argv[1:]))
os.system("/usr/bin/enscript", **options, f'--header={header}', **sys.argv[1:])

# PS. Using footers would be nice, but that would require writing enscript *.hdr files.

0 comments on commit ab694c7

Please sign in to comment.