[2574] in SIPB_Linux_Development
Re: /bin/login (ttylogin) and /etc/sendmail.cf (athena-rc)
daemon@ATHENA.MIT.EDU (Derek Atkins)
Wed Feb 10 22:14:12 1999
To: Salvatore Valente <svalente@MIT.EDU>
Cc: linux-dev@MIT.EDU
From: Derek Atkins <warlord@MIT.EDU>
Date: 10 Feb 1999 22:13:51 -0500
In-Reply-To: Salvatore Valente's message of Wed, 10 Feb 1999 22:06:15 -0500 (EST)
Also be warned that the trigger will get run when ttylogin gets
updated, too... So you should check that /bin/login is a real
file before renaming it. You can verify this by adding a revision
of "trigger" in your test.
Thank you for testing this :)
-derek
Salvatore Valente <svalente@MIT.EDU> writes:
>
>
> Derek wrote:
>
> If there is an update of util-linux, it will write-through the symlink
> and we will lose /bin/athena/login...
> I've tested this in the past.
>
> As far as I can tell, rpm has been fixed so it works now. "rpm -U"
> appears to erase the old files (whether they are actual files or
> symlinks) before it creates the new files.
>
> To test this, I created a two revisions of a package called "lntest"
> which contained the file /tmp/lntest, and a package called "trigger"
> which contained the following trigger:
>
> %triggerin -- lntest
> mv -f /tmp/lntest /tmp/lntest.orig
> ln -s /tmp/athena-lntest /tmp/lntest
>
> Notice that, when I upgraded to the second revision of lntest, it
> created the new /tmp/lntest without destroying /tmp/athena-lntest.
> Then, the trigger kicked in (again). It renamed the new "lntest" to
> "lntest.orig" (overwriting the original lntest.orig), and recreated
> the symlink.
>
> # rpm -i /usr/src/redhat/RPMS/i386/lntest-1-1.i386.rpm
> # cat lntest
> this is lntest 1
> # rpm -i /usr/src/redhat/RPMS/i386/trigger-1-1.i386.rpm
> # cat lntest
> this is athena-lntest
> # rpm -U /usr/src/redhat/RPMS/i386/lntest-1-2.i386.rpm
> # cat lntest
> this is athena-lntest
> # cat lntest.orig
> this is lntest 2
>
> Also, as the ttylogin scripts currently exist, if there is
> ever an upgrade to ttylogin it will wind up restoring the original
> /bin/login (%postun _IS_ run on upgrade!)
>
> I'll fix the %postun.
>
> Sal.
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL N1NWH
warlord@MIT.EDU PGP key available