source: trunk/debathena/debathena/dotfiles/check-for-reboot @ 25644

Revision 25644, 513 bytes checked in by jdreed, 12 years ago (diff)
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.
  • Property svn:executable set to *
Line 
1#!/bin/sh
2#
3# This is _executed_, not sourced
4
5if [ "$(machtype -L)" != "debathena-cluster" ] && \
6   [ -f /var/run/reboot-required ] && \
7   [ -n "$DISPLAY" ]; then
8    reason="A package or process has indicated that a reboot is needed."
9    if egrep -q '[[:alnum:]]' /var/run/reboot-required; then
10        reason="$(cat /var/run/reboot-required)"
11    fi
12    zenity --no-wrap --info --title="Reboot Needed" --text="Your workstation needs to be rebooted.\nReason: $reason\nPlease reboot as soon as possible."
13fi
14exit 0
Note: See TracBrowser for help on using the repository browser.