Debian Bug report logs - #437176
Please provide an 'update-motd' script instead of handling motd updates in the initscript

version graph

Package: initscripts; Maintainer for initscripts is Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>; Source for initscripts is src:sysvinit.

Reported by: Javier Fernández-Sanguino Peña <jfs@computer.org>

Date: Fri, 10 Aug 2007 21:24:01 UTC

Severity: normal

Found in version sysvinit/2.86.ds1-7

Fixed in version sysvinit/2.88dsf-24

Done: Roger Leigh <rleigh@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#437176; Package initscripts. Full text and rfc822 format available.

Acknowledgement sent to Javier Fernández-Sanguino Peña <jfs@computer.org>:
New Bug report received and forwarded. Copy sent to Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Javier Fernández-Sanguino Peña <jfs@computer.org>
To: submit@bugs.debian.org
Subject: Please provide an 'update-motd' script instead of handling motd updates in the initscript
Date: Fri, 10 Aug 2007 23:22:56 +0200
[Message part 1 (text/plain, inline)]
Package: initscripts
Version: 2.86.ds1-7
Tags: wishlist

Right now users wishing to edit motd just have two options:

- Do not point /etc/motd to /var/run/motd and instead point to a static file,
  and edit that file
    Advantage: Inmediate visibility
    Disadvantage: Motd cannot be updated with dynamic info

- Edit /etc/motd.tail
    Advantage: Preserve dynamic info
    Disadvantage: Will only be seen after a system reboot

Motd(1) does not describe this (will issue a different bug) but IMHO we
should have an 'update-motd' script to update motd, even if it just did the 
following (from bootmisc.sh's script):

    # Update motd
    uname -snrvm > /var/run/motd
    [ -f /etc/motd.tail ] && cat /etc/motd.tail >> /var/run/motd

And the 'update-motd' script should be run by bootmisc.sh.

That way admin's could update the motd by editing /etc/motd.tail and just 
running 'update-motd' and could have a system that had a) Inmediate
visibility and b) Preserve dynamic info

Notice also that the script could

a) check if /etc/motd exists and recreate it if it didn't
b) warn (if /etc/motd exists but does not point to /var/run/motd), that 
   the contents will not be shown to the user.
c) warn (if the user still has the EDITMOTD=no from older releases), that
   this variable is obsolete

So it could actually be a little bit more than a 2-line script :)

If the initscripts' maintainers are willing to go this way I can provide a
working patch for this.


Regards

Javier

[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#437176; Package initscripts. Full text and rfc822 format available.

Acknowledgement sent to Erich Schubert <erich@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #10 received at 437176@bugs.debian.org (full text, mbox):

From: Erich Schubert <erich@debian.org>
To: 353229@bugs.debian.org, 437176@bugs.debian.org
Subject: initscripts /etc/motd updating
Date: Thu, 07 Feb 2008 16:31:55 +0100
[Message part 1 (text/plain, inline)]
Hi,
Attached is a small patch which allows users to disable the MOTD
updating altogether in a straightforward way - by replacing it with a
real file or symlink pointing somewhere else.

Note that the SELinux policy currently probably (and probably will
always, unless you implement #437176, splitting the motd updating out
into a separate script!) will break MOTD updating anyway.
So with this patch, all the user would need to to is to replace the motd
file with a static version.

best regards,
Erich Schubert
-- 
     erich@(vitavonni.de|debian.org)    --    GPG Key ID: 4B3A135C     (o_
The problem with the future is that it keeps turning into the present. //\
   Wenn zwei gute Freunde sind, die einander kennen, Sonn' und Mond    V_/_
     begegnen sich, ehe sie sich trennen. --- Clemens von Brentano
[motd-updating.patch (text/x-patch, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#437176; Package initscripts. Full text and rfc822 format available.

Acknowledgement sent to martin f krafft <madduck@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>. Full text and rfc822 format available.

Message #15 received at 437176@bugs.debian.org (full text, mbox):

From: martin f krafft <madduck@debian.org>
To: 437176@bugs.debian.org
Subject: Re: Bug#437176: Please provide an 'update-motd' script instead of handling motd updates in the initscript
Date: Sun, 13 Jul 2008 18:55:22 +0200
[Message part 1 (text/plain, inline)]
also sprach Javier Fernández-Sanguino Peña <jfs@computer.org> [2007.08.10.2322 +0200]:
> Motd(1) does not describe this (will issue a different bug) but IMHO we
> should have an 'update-motd' script to update motd, even if it just did the 
> following (from bootmisc.sh's script):
> 
>     # Update motd
>     uname -snrvm > /var/run/motd
>     [ -f /etc/motd.tail ] && cat /etc/motd.tail >> /var/run/motd
> 
> And the 'update-motd' script should be run by bootmisc.sh.

Any news on this?

-- 
 .''`.   martin f. krafft <madduck@debian.org>
: :'  :  proud Debian developer, author, administrator, and user
`. `'`   http://people.debian.org/~madduck - http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems
[digital_signature_gpg.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#437176; Package initscripts. (Wed, 22 Apr 2009 22:33:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guilherme Gondim <semente@taurinus.org>:
Extra info received and forwarded to list. Copy sent to Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>. (Wed, 22 Apr 2009 22:33:04 GMT) Full text and rfc822 format available.

Message #20 received at 437176@bugs.debian.org (full text, mbox):

From: Guilherme Gondim <semente@taurinus.org>
To: 437176@bugs.debian.org
Subject: Ubuntu have a update-motd package
Date: Wed, 22 Apr 2009 19:30:37 -0300
[Message part 1 (text/plain, inline)]
This is useful: https://launchpad.net/update-motd

-- 
Guilherme Gondim (semente)
http://semente.taurinus.org
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#437176; Package initscripts. (Sat, 16 Jan 2010 09:54:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Victor Pablos Ceruelo <victorpablosceruelo@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>. (Sat, 16 Jan 2010 09:54:02 GMT) Full text and rfc822 format available.

Message #25 received at 437176@bugs.debian.org (full text, mbox):

From: Victor Pablos Ceruelo <victorpablosceruelo@gmail.com>
To: 437176@bugs.debian.org
Subject: update-motd should be in debian ...
Date: Sat, 16 Jan 2010 10:50:59 +0100
IMHO, it is not only useful for showing dynamic logos, but info on 
updates available and/or system restart required msgs.

Ubuntu has update-motd and is really useful to see system load, needed 
updates and necessity of restarting system just when you log into the 
machine.

It is really useful:
http://dustinkirkland.wordpress.com/2008/11/12/ubuntu-jaunty-updates-available-and-reboot-required-now-in-etcmotd/





Information forwarded to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#437176; Package initscripts. (Tue, 16 Feb 2010 18:00:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Rafael Almeida <almeidaraf@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>. (Tue, 16 Feb 2010 18:00:03 GMT) Full text and rfc822 format available.

Message #30 received at 437176@bugs.debian.org (full text, mbox):

From: Rafael Almeida <almeidaraf@gmail.com>
To: 437176@bugs.debian.org
Subject: There should be a way to disable automatic update
Date: Tue, 16 Feb 2010 15:57:30 -0200
As it currently stands I cannot have a fully customized motd (unless I
change /etc/motd to a regular file or point somewhere else). It seems
very silly to me that I cannot edit /etc/motd and have it done with.
It's a very simple feature, I have no point in all this mess that was
made around it.

I've chosen to change it to a regular file in the system I administer.
I'm not too sure what will happen when the package is updated some
day. Will it be changed back? I suspect it will. Couldn't this be done
in a way that you are able to keep whatever you want as motd even if
there are packages updates?




Information forwarded to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#437176; Package initscripts. (Tue, 16 Aug 2011 22:21:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alejandro Exojo <suy@badopi.org>:
Extra info received and forwarded to list. Copy sent to Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>. (Tue, 16 Aug 2011 22:21:07 GMT) Full text and rfc822 format available.

Message #35 received at 437176@bugs.debian.org (full text, mbox):

From: Alejandro Exojo <suy@badopi.org>
To: 437176@bugs.debian.org
Subject: Any news on this?
Date: Wed, 17 Aug 2011 00:18:38 +0200
Can the maintainers please give any feedback on this bug? Wontfix? Help needed?

Thank you very much.
-- 
Alex (a.k.a. suy) | GPG ID 0x0B8B0BC2
http://barnacity.net/ | http://disperso.net




Information forwarded to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#437176; Package initscripts. (Thu, 02 Feb 2012 04:03:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Antoine Beaupré <anarcat+bts@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>. (Thu, 02 Feb 2012 04:03:04 GMT) Full text and rfc822 format available.

Message #40 received at 437176@bugs.debian.org (full text, mbox):

From: Antoine Beaupré <anarcat+bts@debian.org>
To: 437176@bugs.debian.org
Subject: current state of affairs of /etc/motd
Date: Wed, 01 Feb 2012 22:59:40 -0500
[Message part 1 (text/plain, inline)]
I have tried to write up an article explaining the current state of
affairs of /etc/motd in Debian (and other distributions) here:

http://wiki.debian.org/motd

One thing to understand is that Ubuntu, while it had an "update-motd"
package for a short while, now generates their /etc/motd file through
pam (!), through /etc/update-motd.d.

The fun thing is that Debian also ships with that patch: the difference
is that it doesn't create that directory, so the scripts don't run and
the directory is ignored. But right now, if you create that directory
and put scripts into it, they will be used to generate an /etc/motd
file, on the fly, wich you scripts.

So this begs the question: what would `update-motd` do? Would it run
things from `/etc/update-motd.d` or just the hardcoded stuff in
/etc/init.d/bootlogs?

It seems we need to settle on how we want to deal with this now: either
we drop the Ubuntu patch of update-motd.d or we expand it to put our
scripts there and run them through update-motd and bootlogs.

Furthermore, i believe the current behavior of *not* updating this on
login is good, since it kept us away from two severe local root security
issues. So if we do ship with update-motd.d, I think we should add
noupdate to the pam_motd line.

Oh and through all that, the documentation needs to be updated because
the manpages do not talk about that directory at all right now.

Just my two cents.

A.

-- 
Advertisers, not governments, are the primary censors of media content 
in the United States today.
                        - C. Edwin Baker
                        http://www.ad-mad.co.uk/quotes/freespeech.htm
[Message part 2 (application/pgp-signature, inline)]

Reply sent to Roger Leigh <rleigh@debian.org>:
You have taken responsibility. (Tue, 08 May 2012 22:06:13 GMT) Full text and rfc822 format available.

Notification sent to Javier Fernández-Sanguino Peña <jfs@computer.org>:
Bug acknowledged by developer. (Tue, 08 May 2012 22:06:13 GMT) Full text and rfc822 format available.

Message #45 received at 437176-close@bugs.debian.org (full text, mbox):

From: Roger Leigh <rleigh@debian.org>
To: 437176-close@bugs.debian.org
Subject: Bug#437176: fixed in sysvinit 2.88dsf-24
Date: Tue, 08 May 2012 22:04:42 +0000
Source: sysvinit
Source-Version: 2.88dsf-24

We believe that the bug you reported is fixed in the latest version of
sysvinit, which is due to be installed in the Debian FTP archive:

bootlogd_2.88dsf-24_amd64.deb
  to main/s/sysvinit/bootlogd_2.88dsf-24_amd64.deb
initscripts_2.88dsf-24_amd64.deb
  to main/s/sysvinit/initscripts_2.88dsf-24_amd64.deb
sysv-rc_2.88dsf-24_all.deb
  to main/s/sysvinit/sysv-rc_2.88dsf-24_all.deb
sysvinit-utils_2.88dsf-24_amd64.deb
  to main/s/sysvinit/sysvinit-utils_2.88dsf-24_amd64.deb
sysvinit_2.88dsf-24.debian.tar.gz
  to main/s/sysvinit/sysvinit_2.88dsf-24.debian.tar.gz
sysvinit_2.88dsf-24.dsc
  to main/s/sysvinit/sysvinit_2.88dsf-24.dsc
sysvinit_2.88dsf-24_amd64.deb
  to main/s/sysvinit/sysvinit_2.88dsf-24_amd64.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 437176@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Roger Leigh <rleigh@debian.org> (supplier of updated sysvinit package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sun, 29 Apr 2012 23:52:14 +0100
Source: sysvinit
Binary: sysvinit sysvinit-utils sysv-rc initscripts bootlogd
Architecture: source amd64 all
Version: 2.88dsf-24
Distribution: experimental
Urgency: low
Maintainer: Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>
Changed-By: Roger Leigh <rleigh@debian.org>
Description: 
 bootlogd   - daemon to log boot messages
 initscripts - scripts for initializing and shutting down the system
 sysv-rc    - System-V-like runlevel change mechanism
 sysvinit   - System-V-like init utilities
 sysvinit-utils - System-V-like utilities
Closes: 353229 437176 624391 660824 668307 669949 670085
Changes: 
 sysvinit (2.88dsf-24) experimental; urgency=low
 .
   [ Roger Leigh ]
   * initscripts:
     - Don't generate or touch /etc/motd.  Instead, the dynamic part of
       /etc/motd is created as /run/motd.dynamic, leaving /etc/motd
       entirely under the control of the system administrator.  If
       /etc/motd is a symlink to /run/motd, /etc/motd.tail is moved
       back to /etc/motd.  Closes: #353229, #624391, #668307.  /etc/motd
       is not removed if initscripts is purged, since it's not owned by
       initscripts.
     - By default, /run/motd is just the output of uname, preserving the
       existing behaviour.  However, should the administrator wish to
       include dynamic information in the motd, they may write scripts
       to update /run/motd.dynamic as they please.  Closes: #437176.
     - motd generation is split from bootlogs into a separate motd
       init script.
     - bootlogs init script has been removed; current logging daemons
       handle this themselves, making this script redundant.
     - tmpfs mounts are never cleaned by bootclean.sh.  Cleaning /run
       can lead to nonfunctional input when Xorg starts.  Closes: #669949.
   * sysvinit-utils:
     - Suggest rather than Recommend bootlogd; Recommends would effectively
 .
   [ Kel Modderman ]
   * sysv-rc:
     - Run check_divert in postinst to make sure /usr/sbin/update-rc.d
       not symlinked to /usr/sbin/update-rc.d-insserv.  Closes: #670085.
 .
   [ Steve Langasek ]
   * Install the startpar bridge now that dh_installinit in Debian handles
     this.  Closes: #660824.
   * Give startpar a listening backlog on its socket for upstart connections,
     since there's no protocol-level queuing for unix sockets and these
     connections tend to come in fast and furious at boot.
Checksums-Sha1: 
 e01a5b8072f791cc5d66936329847c5d51d825ab 2342 sysvinit_2.88dsf-24.dsc
 a054d9eb9019cd1fb6b1ab24d40ab26aec4094ce 198897 sysvinit_2.88dsf-24.debian.tar.gz
 4df675fc72df9346acdb22cb558d4fc670205eff 130470 sysvinit_2.88dsf-24_amd64.deb
 7d84a863630f5a27ce4b86ba13cdb2c38c21354c 96086 sysvinit-utils_2.88dsf-24_amd64.deb
 a99e96ad8604dc5ca8557d296e627c36bf272595 74648 sysv-rc_2.88dsf-24_all.deb
 4539b113f5fc25c223af2fdccb77bb45622e0945 86030 initscripts_2.88dsf-24_amd64.deb
 8b0dc812470ccc8e22487bac445ca920cc4311c8 51688 bootlogd_2.88dsf-24_amd64.deb
Checksums-Sha256: 
 d89af707a8d7ec8af027b4a140c432c61688abc0a15a9cfa865d0d4a70c64a3b 2342 sysvinit_2.88dsf-24.dsc
 4909c59767dfad57adfe7a7a7e81285ad19d62c33d2b582d94f8fc9e3c7df4ea 198897 sysvinit_2.88dsf-24.debian.tar.gz
 2d1ee660060c84fa15fa988d15b86485bb7bde2f2304952521eb5e5ee7da4f1b 130470 sysvinit_2.88dsf-24_amd64.deb
 9b0779230de35778b6073918f1bbd14591d9bc6ada60454aa1153ac3f8cb69e7 96086 sysvinit-utils_2.88dsf-24_amd64.deb
 59d1d31136301a23c2e5d8db71f87221c34ac04e8d4bf1a381316f1953df603b 74648 sysv-rc_2.88dsf-24_all.deb
 ae5ee9452bbce06a1f5dc43f54f815d310d1f1f5d70b7f3e16da8960a9c571e8 86030 initscripts_2.88dsf-24_amd64.deb
 ef50a2ded21580a60847b0a53fd3e978a2e074adbd301ec845f7b705adde6215 51688 bootlogd_2.88dsf-24_amd64.deb
Files: 
 457458d34dd44212495e37e149415a24 2342 admin required sysvinit_2.88dsf-24.dsc
 3cc8109a4d3686c9d8bd7c65f7c13381 198897 admin required sysvinit_2.88dsf-24.debian.tar.gz
 7776c56f9cb448975c2de1266d60290d 130470 admin required sysvinit_2.88dsf-24_amd64.deb
 4fe7e75552689d57dab101eb041b3aa2 96086 admin required sysvinit-utils_2.88dsf-24_amd64.deb
 bd8f2c760f0427a9bfc0f1204a448cdb 74648 admin required sysv-rc_2.88dsf-24_all.deb
 801629c05aad9f87d74f6e56cc9ccd7d 86030 admin required initscripts_2.88dsf-24_amd64.deb
 44f5c2f88f9dbf0cecbf00390a9508e9 51688 admin optional bootlogd_2.88dsf-24_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCgAGBQJPqZXmAAoJEOJSSsUKn1xZnLYP/0Z7ZGLvbYotXGTzkYfNCm4g
L9ETRt9DFMG3l2A2YJRK95bG82ozBBR9C5vHvLQ/57qVvVUt+HeciCOcLpNuxYTF
IFJs6Tt/FzRZcJ7EE7kBULrCb8R188XgBLI1AkP1eclz4oQvbchRIf5xGP3k0ix7
4NviO6ju/FFZklWIuaITW3PWR3c2Ezw6TOdvfoZK9Ab8H0bVM3Y6S7936P0gq+ZB
ghhVbbxsqJt3gCXAjCr24x8Ghyvg5HsJuq1xM63N3mUJGV7mor2rsuk2fs2O5Veg
nBGs8LY97mN0BBU1BiG4RGNPTdZt5Um3ziXF6ssdoSEPnfGy1gq6vcxeqrWD9RKJ
W2lHcJnSUkBBYGvYitB/y/cE6v3Xl/7+IVgDmOvEaoT1klE4tney18Lsv8rahEtK
TTzgpCzF4hQkdcYQEYYc70FpB9tElvEfu6JmPMuSywjwoLg/vMl2kdwsvPOX0O5d
15aQZUkziMphnUY0Q7p4ug2rxTNL18BP38hSYmJoxYKuKRKRAqV2a1UIq+DbpXNf
ua9Aw+Yl9HeBAaZo5AyjTobYlqEXGJYW5AmidhIuE1wgcyfdoqe0fObm5PTDATf3
pldz87JZWxpoZSuRCQp3z3RjhB8Bcl4WpNs2ZjJz1PLg9OWemI3XjU1uxT6aRnYP
/Utx4/qsfT85+CzPiVYP
=hnAp
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 01 Sep 2012 07:30:28 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 16 19:39:31 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.