[26599] in Source-Commits
/svn/athena r25644 - in trunk/debathena/debathena/dotfiles: . debian
daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Thu Jul 19 08:52:44 2012
Date: Thu, 19 Jul 2012 08:52:42 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201207191252.q6JCqgsk031924@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: jdreed
Date: 2012-07-19 08:52:42 -0400 (Thu, 19 Jul 2012)
New Revision: 25644
Added:
trunk/debathena/debathena/dotfiles/check-for-reboot
Modified:
trunk/debathena/debathena/dotfiles/Makefile
trunk/debathena/debathena/dotfiles/bashrc
trunk/debathena/debathena/dotfiles/cshrc
trunk/debathena/debathena/dotfiles/debian/changelog
Log:
In dotfiles:
* Add /usr/lib/init/check-for-reboot to the logout aliases (Trac: #971).
We add this here and not in xsession, because dotfiles can't/shouldn't
depend on xsession.
Modified: trunk/debathena/debathena/dotfiles/Makefile
===================================================================
--- trunk/debathena/debathena/dotfiles/Makefile 2012-07-19 12:01:19 UTC (rev 25643)
+++ trunk/debathena/debathena/dotfiles/Makefile 2012-07-19 12:52:42 UTC (rev 25644)
@@ -47,6 +47,7 @@
install -c -m 0755 welcome.desktop ${DESTDIR}${PROTODESKTOP}
install -c -m 0755 olh.desktop ${DESTDIR}${PROTODESKTOP}
install -c -m 0755 faq.desktop ${DESTDIR}${PROTODESKTOP}
+ install -c -m 0755 check-for-reboot ${DESTDIR}${SYSTEM}
clean:
Modified: trunk/debathena/debathena/dotfiles/bashrc
===================================================================
--- trunk/debathena/debathena/dotfiles/bashrc 2012-07-19 12:01:19 UTC (rev 25643)
+++ trunk/debathena/debathena/dotfiles/bashrc 2012-07-19 12:52:42 UTC (rev 25644)
@@ -107,9 +107,9 @@
if [ "${XSESSION+set}" = set ]; then
if [ -x /usr/bin/gnome-session-quit ]; then
- logout () { gnome-session-quit --no-prompt; exit; } # logout for X
+ logout () { /usr/lib/init/check-for-reboot; gnome-session-quit --no-prompt; exit; } # logout for X
else
- logout () { gnome-session-save --kill --silent; exit; } # logout for X
+ logout () { /usr/lib/init/check-for-reboot; gnome-session-save --kill --silent; exit; } # logout for X
fi
fi
Added: trunk/debathena/debathena/dotfiles/check-for-reboot
===================================================================
--- trunk/debathena/debathena/dotfiles/check-for-reboot (rev 0)
+++ trunk/debathena/debathena/dotfiles/check-for-reboot 2012-07-19 12:52:42 UTC (rev 25644)
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# This is _executed_, not sourced
+
+if [ "$(machtype -L)" != "debathena-cluster" ] && \
+ [ -f /var/run/reboot-required ] && \
+ [ -n "$DISPLAY" ]; then
+ reason="A package or process has indicated that a reboot is needed."
+ if egrep -q '[[:alnum:]]' /var/run/reboot-required; then
+ reason="$(cat /var/run/reboot-required)"
+ fi
+ zenity --no-wrap --info --title="Reboot Needed" --text="Your workstation needs to be rebooted.\nReason: $reason\nPlease reboot as soon as possible."
+fi
+exit 0
Property changes on: trunk/debathena/debathena/dotfiles/check-for-reboot
___________________________________________________________________
Added: svn:executable
+ *
Modified: trunk/debathena/debathena/dotfiles/cshrc
===================================================================
--- trunk/debathena/debathena/dotfiles/cshrc 2012-07-19 12:01:19 UTC (rev 25643)
+++ trunk/debathena/debathena/dotfiles/cshrc 2012-07-19 12:52:42 UTC (rev 25644)
@@ -149,9 +149,9 @@
if ($?XSESSION) then
if ( -x /usr/bin/gnome-session-quit ) then
- alias logout 'exit && gnome-session-quit --no-prompt' # logout for X
+ alias logout 'exit && /usr/lib/init/check-for-reboot && gnome-session-quit --no-prompt' # logout for X
else
- alias logout 'exit && gnome-session-save --kill --silent' # logout for X
+ alias logout 'exit && /usr/lib/init/check-for-reboot && gnome-session-save --kill --silent' # logout for X
endif
endif
Modified: trunk/debathena/debathena/dotfiles/debian/changelog
===================================================================
--- trunk/debathena/debathena/dotfiles/debian/changelog 2012-07-19 12:01:19 UTC (rev 25643)
+++ trunk/debathena/debathena/dotfiles/debian/changelog 2012-07-19 12:52:42 UTC (rev 25644)
@@ -1,3 +1,11 @@
+debathena-dotfiles (10.0.31-0debathena1) unstable; urgency=low
+
+ * Add /usr/lib/init/check-for-reboot to the logout aliases (Trac: #971).
+ We add this here and not in xsession, because dotfiles can't/shouldn't
+ depend on xsession.
+
+ -- Jonathan Reed <jdreed@mit.edu> Thu, 19 Jul 2012 08:51:06 -0400
+
debathena-dotfiles (10.0.30-0debathena5) unstable; urgency=low
* Don't use bash's path separator in tcsh