[scponly] setup_chroot.sh

wby oblyr joe at sublimation.org
Thu Nov 20 10:36:07 EST 2003


great ideas.  i'll make the changes.

joe


Lupe Christoph wrote this message on Thu, Nov 20, 2003 at 19:38 
+0100:
> On Wednesday, 2003-11-19 at 16:12:22 -0800, wby oblyr wrote:
> 
> > the idea here is that the generic case (setup_chroot.sh) will take a best guess approach, but any customizations required
> > for the various platforms can be located in a seperate file. 
> 
> > the pathname of this file will be "build_extras/arch/`uname -sr`.pre.sh"
> 
> Please avoid spaces in filenames, better use
>   uname -sr | tr ' ' '_'
> 
> And I believe this is too kernel version specific on Linux and FreeBSD:
> 
> Linux_2.4.22-1-k7
> FreeBSD_4.8-RELEASE-p10
> SunOS_5.8
> 
> And we do not have the Linux distribution in that string, which plays a
> bigger role than the kernel rev. 2.2 and 2.4 will behave pretty much the
> same from the standpoint of scponly, but will all the myriad dists that
> use them?
> 
> I believe the only truely flexible approach would be to have plugins by
> platform (uname -s) and for the truely weird cases have the plugins
> determine if the platform is one they have been written for.
> 
> Like this (untested):
> 
> PLATFORM=`uname -s`
> if [ -d $PLATFORM.d ]; then
>   for plugin in $PLATFORM.d/*; do
>     if $plugin; then
>       PLATFORM=$PLATFORM-`basename $plugin`
>     fi
>   done
> fi
> 
> if [ -f $PLATFORM/pre.sh ]; then
>   . build_extras/arch/$PLATFORM.pre.sh
> else
>   . build_extras/generic/pre.sh
> fi
> 
> I.e. try to find a specific plugin, fall back to platform-generic, fall
> back to generic.
> 
> The $PLATFORM.d/* could probe /etc/issue, or whatever they like, to
> determine if they are called for. Remaining issue: how to avoid
> multiple plugins signaling they are "it".
> 
> Lupe Christoph
> -- 
> | lupe at lupe-christoph.de       |           http://www.lupe-christoph.de/ |
> | "Violence is the resort of the violent" Lu Tze                         |
> | "Thief of Time", Terry Pratchett                                       |
> _______________________________________________
> scponly mailing list
> scponly at lists.ccs.neu.edu
> https://lists.ccs.neu.edu/bin/listinfo/scponly

-- 
----

PGP KEY: http://www.sublimation.org/contact.html
PGP Key fingerprint = EC4B 0DA5 B4F6 BDDD 9176 55D6 3A6A 7D63 158F 22D2 



More information about the scponly mailing list