[PATCH] Busybox compatible boot scripts

Jules Colding JuBColding at yorkref.com
Fri Jan 17 02:48:08 PST 2003


Hi,

This mail might be a resend as something went wrong the first time. I am
sorry if this is the case..

But - the attached patch makes lfs-bootscripts-1.10 compatible with the
ash shell from busybox-0.60.5 without loss of bash functionality. People
should run something like:

----------- START ----------
#!/bin/sh
# Make all the bootscripts use /bin/(a)sh not /bin/bash
cd /etc/rc.d/init.d
if [ ! -e /bin/bash ]; then
    if [ -e /bin/ash ]; then
        shell=ash
    else
        shell=sh
    fi
    for file in $(find . -type f -maxdepth 1 -name "*"); do
        sed -e s/"#!\/bin\/bash"/"#!\/bin\/$shell"/ $file > $file.XXX
        mv -f $file.XXX $file
    done
fi
chmod 755 /etc/rc.d/init.d/*
------------ END -----------

on their installed boot scripts to make sure that the correct shell is
invoked - though strictly not needed.

Regards,
jules

-------------- next part --------------
A non-text attachment was scrubbed...
Name: lfs-bootscripts-1.10-syntax.patch.bz2
Type: application/x-bzip
Size: 1630 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-dev/attachments/20030117/7e8cd371/attachment.bin>


More information about the lfs-dev mailing list