etc/update-motd.d/55-window-manager: print the MOTD appendage up to 3

times, LP: #680657
This commit is contained in:
Dustin Kirkland 2010-11-27 09:10:49 -06:00
commit 12b261d89c
2 changed files with 15 additions and 8 deletions

5
debian/changelog vendored
View file

@ -1,8 +1,9 @@
byobu (3.13) unreleased; urgency=low byobu (3.13) unreleased; urgency=low
* UNRELEASED * etc/update-motd.d/55-window-manager: print the MOTD appendage up to 3
times, LP: #680657
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 25 Nov 2010 18:50:39 -0600 -- Dustin Kirkland <kirkland@ubuntu.com> Sat, 27 Nov 2010 09:09:50 -0600
byobu (3.12-0ubuntu1) natty; urgency=low byobu (3.12-0ubuntu1) natty; urgency=low

View file

@ -1,10 +1,16 @@
#!/bin/sh #!/bin/sh
# To disable this MOTD appendage: # This MOTD appendage will print 3 times, and then silence itself.
# sudo touch /etc/byobu/disable-motd # To silence immediately:
# echo 3 | sudo tee /etc/byobu/motd-count
if [ ! -e /etc/profile.d/Z98-byobu.sh ] && [ ! -e /etc/byobu/disable-motd ]; then if [ ! -e /etc/profile.d/Z98-byobu.sh ]; then
echo count=$(cat /etc/byobu/motd-count 2>/dev/null || echo 0)
echo "For a premium command line experience, enable Ubuntu's text-based window manager:" if [ "$count" -lt 3 ]; then
echo " byobu-enable" echo
echo "For a premium command line experience, enable Ubuntu's text window manager:"
echo " byobu-enable"
count=$(expr "$count" + 1)
echo "$count" > /etc/byobu/motd-count
fi
fi fi