From hurd-bug Mon Jul 22 14:16:56 2013 From: Pino Toscano Date: Mon, 22 Jul 2013 14:16:56 +0000 To: hurd-bug Subject: Re: [PATCH 8/8] sysvinit: Fix getty path in /etc/inittab on Hurd. Message-Id: <201307221616.56953.toscano.pino () tiscali ! it> X-MARC-Message: https://marc.info/?l=hurd-bug&m=137450456617063 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--nextPart44368376.vXT2bFpXYt" --nextPart44368376.vXT2bFpXYt Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Alle marted=EC 9 luglio 2013, Justus Winter ha scritto: > diff --git a/debian/sysvinit.postinst b/debian/sysvinit.postinst > index 1750412..061f53b 100755 > --- a/debian/sysvinit.postinst > +++ b/debian/sysvinit.postinst > @@ -85,6 +85,10 @@ then > if [ ! -f /etc/inittab ] > then > cp -p /usr/share/sysvinit/inittab /etc/inittab > fi I would put the code in the "else" of this "if". > +if [ "$(uname)" =3D GNU ]; then > + sed -i -e 's|/libexec/getty|/sbin/getty|' /etc/inittab > +fi > + A better solution could be get the md5sum of /etc/inittab, and compare=20 it with the one of the current version (the one with old paths): if they=20 match, then the user did not change it at all, and it can be just=20 replaced; if does not match, either ask the user what to do, or simply=20 move the old file as .dpkg-old and put the new in place, of course=20 warning the user about that. =2D-=20 Pino Toscano --nextPart44368376.vXT2bFpXYt Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) iD8DBQBR7T7YTNH2piB/L3oRAvPaAKDL27By6PtVCAPkivyDtv4CCTtbUACggary 8C4t8gjeG/JrijlOdi8rcsI= =ssgD -----END PGP SIGNATURE----- --nextPart44368376.vXT2bFpXYt--