I have screen profiles for "all scripts web servers", "all scripts hosts",
etc., which means I often want to run screen with root tickets and pass it some
options. This makes that easy.
This uses the technique from ASA DB commit
08d4fa6744d2785023666d10a1936460811fcdb2
(https://asa.scripts.mit.edu/trac/changeset/
08d4fa6744d2785023666d10a1936460811fcdb2)
to pass commands possibly containing metacharacters through pagsh without
quoting issues.
klist -s || krbroot init || exit 1;
HOST="`hostname` (krbroot)" pagsh -c $SHELL
;;
+ screen)
+ klist -s || krbroot init || exit 1;
+ HOST="`hostname` (krbroot)" pagsh -c 'exec "$@"' exec "$@"
+ ;;
ssh)
klist -s || krbroot init || exit 1;
shift