[Piuparts-commits] [SCM] piuparts git repository branch, piatti, updated. 0.49-105-gac1319a
Andreas Beckmann
anbe at debian.org
Fri Mar 1 15:33:06 UTC 2013
The following commit has been merged in the piatti branch:
commit 644324e9ea81bc037892ce5b654dd0fa4dfa2136
Author: Andreas Beckmann <anbe at debian.org>
Date: Sat Feb 23 19:12:19 2013 +0100
slave_join: use 'script /dev/null' to get a writable tty
avoid
user$ sudo su - piupartss
piupartss$ screen -x
Cannot open your terminal '/dev/pts/42' - please check.
Signed-off-by: Andreas Beckmann <anbe at debian.org>
diff --git a/debian/changelog b/debian/changelog
index cdcacb2..d462230 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -67,6 +67,8 @@ piuparts (0.50) UNRELEASED; urgency=low
* slave_{run,join}: Rename the screen session to "piuparts_slave_screen".
* slave_cleanup: Use pgrep to find running piuparts-slave processes.
* slave_{run,join}: Use screen -ls to find running screen sessions.
+ * slave_join: Use 'script /dev/null' hack if needed to get a writable tty.
+ This avoids running the piuparts-slave screen session as root.
* detect_leftover_processes: Move statefile to slave-directory.
* detect_stale_mounts: Merge into detect_tmp_cruft.
* detect_tmp_cruft: Move to slave-bin and run from slave crontab.
diff --git a/slave-bin/slave_join b/slave-bin/slave_join
index ef0455f..c58b2ec 100755
--- a/slave-bin/slave_join
+++ b/slave-bin/slave_join
@@ -34,4 +34,9 @@ if screen -ls $SESSIONNAME | grep -q "No Sockets found" ; then
exit 1
fi
-screen -R -S $SESSIONNAME
+if [ -w $(tty) ]; then
+ screen -x -S $SESSIONNAME
+else
+ # use script hack to get a new writable tty
+ script -q -c "screen -x -S $SESSIONNAME" /dev/null
+fi
--
piuparts git repository
More information about the Piuparts-commits
mailing list