[plug] mandrake 9.4 startup

filpee filpee at iinet.net.au
Thu Feb 19 19:38:06 WST 2004


Im pretty sure theres no typos here but anyway


#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

[ -f /etc/sysconfig/msec ] && source /etc/sysconfig/msec
[ -z "$SECURE_LEVEL" ] && SECURE_LEVEL=3

# Source functions
. /etc/init.d/functions

if [ -f /etc/mandrake-release -a $SECURE_LEVEL -lt 4 ]; then
    R=$(cat /etc/mandrake-release)

    arch=$(uname -m)
    a="a"
    case "_$arch" in
            _a*) a="an";;
            _i*) a="an";;
    esac

    NUMPROC=`egrep -c "^cpu[0-9]+" /proc/stat`
    if [ "$NUMPROC" -gt "1" ]; then
        SMP="$NUMPROC-processor "
        [ "$NUMPROC" = "2" ] && \
        SMP="Dual-processor "
        if [ "$NUMPROC" = "8" -o "$NUMPROC" = "11" ]; then
            a="an"
        else
            a="a"
        fi
    fi

    # This will overwrite /etc/issue at every boot.  So, make any changes
you
    # want to make to /etc/issue here or you will lose them when you reboot.

    if [ -x /usr/bin/linux_logo ];then
        /usr/bin/linux_logo -c -n -f | sed -e 's|\\|\\\\|g' > /etc/issue
        echo "" >> /etc/issue
    else
        > /etc/issue
    fi
    echo "$R" >> /etc/issue
    echo "Kernel $(uname -r) on $a $SMP$(uname -m) / \l" >> /etc/issue

    if [ "$SECURE_LEVEL" -le 3 ];then
        echo "Welcome to ${HOST}" > /etc/issue.net
        echo "$R" >> /etc/issue.net
        echo "Kernel $(uname -r) on $a $SMP$(uname -m)" >> /etc/issue.net
    else
        > /etc/issue
    fi
    echo "$R" >> /etc/issue
    echo "Kernel $(uname -r) on $a $SMP$(uname -m) / \l" >> /etc/issue

    if [ "$SECURE_LEVEL" -le 3 ];then
        echo "Welcome to ${HOST}" > /etc/issue.net
        echo "$R" >> /etc/issue.net
        echo "Kernel $(uname -r) on $a $SMP$(uname -m)" >> /etc/issue.net
    else
        echo "Welcome to Mandrake Linux" > /etc/issue.net
        echo "-------------------------" >> /etc/issue.net
    fi
elif [ $SECURE_LEVEL -ge 4 ]; then
    rm -f /etc/issue /etc/issue.net
fi

touch /var/lock/subsys/local
/etc/firewall_script
/etc/shaper_script

Its all original mandrake 9.4
Ive added the last two lines

Phil

-----Original Message-----
From: plug-admin at plug.linux.org.au [mailto:plug-admin at plug.linux.org.au] On
Behalf Of James Devenish
Sent: Thursday, 19 February 2004 7:26 PM
To: plug at plug.linux.org.au
Subject: Re: [plug] mandrake 9.4 startup

Hi,

In message <20040219111814.CFAF58C44 at spark.plug.linux.org.au>
on Thu, Feb 19, 2004 at 07:19:03PM +0800, filpee wrote:
> Ok just had a look
> /etc/rc.local is a sym link to /etc/rc.d/rc.local and is read/execute 
> to all (but not write)
> 
> Is there a log file I can check to see if this file is being executed 
> at boot?

Can you send us a copy of your additions to rc.local (just copy-and-paste
into an e-mail)? It is possible that there's a typo, causing an error to be
emitted to the console. That is, your machine might be /attempting/ to use
rc.local but ends up skipping the erroneous line. If you like, I imagine you
could also add something like this to
rc.local:

echo Yes, I ran > /tmp/if_I_am_missing_then_rc.local_was_not_run

You can then look for this file after booting.


_______________________________________________
plug mailing list
plug at plug.linux.org.au
http://mail.plug.linux.org.au/cgi-bin/mailman/listinfo/plug




More information about the plug mailing list