From 08fe16db4ca358295705080d24e3bb364143b826 Mon Sep 17 00:00:00 2001 From: freesource Date: Fri, 7 Feb 2003 18:30:29 +0000 Subject: [PATCH] Welcome to the world of distribution portability. --- yard/templates/Example.yard | 41 ++++++++++++++++++++++++++----------- yard/templates/Helper.yard | 32 +++++++++++++++++++++++++---- 2 files changed, 57 insertions(+), 16 deletions(-) diff --git a/yard/templates/Example.yard b/yard/templates/Example.yard index a871999..74c1613 100644 --- a/yard/templates/Example.yard +++ b/yard/templates/Example.yard @@ -1,4 +1,4 @@ -# $Id: Example.yard,v 1.16 2001/12/14 04:34:46 freesource Exp $ +# $Id: Example.yard,v 1.17 2002/02/08 04:15:23 freesource Exp $ # Example.yard # # Creates a minimalistic multi-user runlevel root filesystem with getty. @@ -148,6 +148,10 @@ telinit # PROVISIONS FOR PAM: /etc/pam.d/other /etc/pam.d/login +\ if ( /etc/pam.d/system-auth ) + # RedHat uses this + /etc/pam.d/system-auth \ + # /etc/pam.conf # PROVISIONS FOR NSS @@ -167,21 +171,34 @@ telinit # #===== DEBIAN uses a program called "getty" which is actually agetty in #===== disguise: -/etc/inittab <= Replacements/etc/inittab.example-deb -#/etc/inittab <= Replacements/etc/inittab.example-deb-nodevfs -/sbin/getty + +\ +if ( getty ) + + /etc/inittab <= Replacements/etc/inittab.example-deb + #/etc/inittab <= Replacements/etc/inittab.example-deb-nodevfs + /sbin/getty + # #===== MANDRAKE, REDHAT and many other modern RH based DISTS use mingetty: -#/etc/inittab <= Replacements/etc/inittab.example.mingetty-rpm -#/etc/inittab <= Replacements/etc/inittab.example.mingetty-rpm-nodevfs -#/sbin/mingetty -#/etc/gettydefs + +elsif ( mingetty ) + + /etc/inittab <= Replacements/etc/inittab.example.mingetty-rpm + #/etc/inittab <= Replacements/etc/inittab.example.mingetty-rpm-nodevfs + /sbin/mingetty + /etc/gettydefs + # #===== SLACKWARE uses agetty: -#/etc/inittab <= Replacements/etc/inittab.example.agetty-slack -#/etc/inittab <= Replacements/etc/inittab.example.agetty-slack-nodevfs -#/sbin/agetty -#/etc/gettydefs + +elsif ( agetty ) + + /etc/inittab <= Replacements/etc/inittab.example.agetty-slack + #/etc/inittab <= Replacements/etc/inittab.example.agetty-slack-nodevfs + /sbin/agetty + /etc/gettydefs +\ # Devices - If devfs isn't desired use the kernel option devfs=nomount /dev/console diff --git a/yard/templates/Helper.yard b/yard/templates/Helper.yard index 260dc9f..d02744d 100644 --- a/yard/templates/Helper.yard +++ b/yard/templates/Helper.yard @@ -1,4 +1,4 @@ -# $Id$ +# $Id: Helper.yard,v 1.2 2002/12/12 01:10:23 freesource Exp $ # Helper.yard # ############################################################################# @@ -79,6 +79,9 @@ telinit # PROVISIONS FOR PAM: /etc/pam.d/other /etc/pam.d/login +\ if ( /etc/pam.d/system-auth ) + # RedHat uses this + /etc/pam.d/system-auth \ # /etc/pam.conf # PROVISIONS FOR NSS @@ -99,9 +102,30 @@ telinit #===== DEBIAN uses a program called "getty" which is actually agetty in #===== disguise: -## The only difference here is that there is only one getty. -/etc/inittab <= Replacements/etc/inittab.example-helper -/sbin/getty +\ +if ( getty ) + /etc/inittab <= Replacements/etc/inittab.example-helper + /sbin/getty + +# +#===== MANDRAKE, REDHAT and many other modern RH based DISTS use mingetty: + +elsif ( mingetty ) + + /etc/inittab <= Replacements/etc/inittab.example-mingetty-helper + /sbin/mingetty + /etc/gettydefs + +# +#===== SLACKWARE uses agetty: + +elsif ( agetty ) + + /etc/inittab <= Replacements/etc/inittab.example-agetty-helper + /sbin/agetty + /etc/gettydefs +\ + ##### utmp and wtmp. # Made by rcS if they don't exist.