From aa6f780a758a977cdcecee9ff45b3f428440a1b0 Mon Sep 17 00:00:00 2001 From: Alex Dehnert Date: Sun, 21 Apr 2013 16:26:59 -0400 Subject: [PATCH] Add a "screen" subcommand to krbroot 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. --- krbroot | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/krbroot b/krbroot index 5f475af..ee98c87 100755 --- a/krbroot +++ b/krbroot @@ -14,6 +14,10 @@ case $1 in 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 -- 2.34.1