7 |
# source kernel config if exists |
# source kernel config if exists |
8 |
[ -f /etc/conf.d/kernel ] && source /etc/conf.d/kernel |
[ -f /etc/conf.d/kernel ] && source /etc/conf.d/kernel |
9 |
|
|
|
# prefer mdev if it is present, always fall back to udev |
|
|
# these settings can be overriden via /etc/conf.d/kernel |
|
|
if [[ -z ${RC_DEVICEMANAGER} ]] |
|
|
then |
|
|
if [[ -e ${rc_base}/init.d/mdev ]] |
|
|
then |
|
|
RC_DEVICEMANAGER="mdev" |
|
|
elif [[ -e ${rc_base}/init.d/udev ]] |
|
|
then |
|
|
RC_DEVICEMANAGER="udev" |
|
|
fi |
|
|
fi |
|
|
|
|
|
# load device management hooks |
|
|
source ${rc_base}/init.d/${RC_DEVICEMANAGER} |
|
|
|
|
10 |
# get mage version |
# get mage version |
11 |
MAGEVER="$(< /etc/mageversion)" |
MAGEVER="$(< /etc/mageversion)" |
12 |
|
|
13 |
trap "" INT QUIT TSTP |
# source kernel config if exists |
14 |
|
[ -f /etc/conf.d/kernel ] && source /etc/conf.d/kernel |
15 |
|
|
16 |
[[ ! -z $1 ]] && runlevel=$1 |
# override devicemanager helper functions |
17 |
|
if [[ ${RC_DEVICEMANAGER} = udev ]] && [[ -f ${rc_base}/init.d/udev ]] |
18 |
|
then |
19 |
|
source ${rc_base}/init.d/udev |
20 |
|
|
21 |
if [[ -z ${runlevel} ]] |
elif [[ ${RC_DEVICEMANAGER} = mdev ]] && [[ -f ${rc_base}/init.d/mdev ]] |
22 |
then |
then |
23 |
echo "Usage: $0 <runlevel>" >&2 |
source ${rc_base}/init.d/mdev |
|
exit 1 |
|
24 |
fi |
fi |
25 |
|
|
26 |
|
trap "" INT QUIT TSTP |
27 |
|
|
28 |
|
[ "$1" != "" ] && runlevel=$1 |
29 |
|
|
30 |
if [[ $runlevel = sysinit ]] |
if [[ $runlevel = sysinit ]] |
31 |
then |
then |
32 |
rc_echo |
rc_echo |
33 |
rc_echo -e "${COLGREEN}Starting ${COLBLUE}MAGELLAN (v${MAGEVER}) ${COLGREEN}Linux${COLDEFAULT}" |
rc_echo -e "${COLGREEN}Starting ${COLBLUE}MAGELLAN (v${MAGEVER}) ${COLGREEN}Linux${COLDEFAULT}" |
34 |
rc_echo -e "Copyright 2001-2010 Niels Rogalla; http://magellan-linux.net" |
rc_echo "Copyright 2001-2011 Niels Rogalla; http://magellan-linux.net" |
35 |
rc_echo |
rc_echo |
36 |
|
|
37 |
# mount proc filesystem, needed for bootsplash; |
# mount proc filesystem, needed for bootsplash; |