5 DEFAULTCFG
=/etc
/boot.cfg.default
6 LOCALCFG
=/etc
/boot.cfg.
local
10 filter_missing_entries
()
14 if ! echo "$line" |
grep -s -q 'multiboot'
20 # Check if kernel presents
21 kernel
=`echo "$line" | sed -n 's/.*multiboot[[:space:]]*\(\/[^[:space:]]*\).*/\1/p'`
24 echo "Warning: config contains entry for \"$kernel\" which is missing! Entry skipped." 1>&2
33 echo root device
$ROOT not found
37 rootdevname
=`echo $ROOT | sed 's/\/dev\///'`
41 default_cfg
=`cat $DEFAULTCFG`
42 # Substitute variables like $rootdevname
43 echo "$default_cfg" |
while read line
; do eval echo \"$line\" | filter_missing_entries
>> $TMP; done
46 if [ -e /boot
/minix_latest
-a -d /boot
/minix_latest
-o -h /boot
/minix_latest
]
48 latest
=`basename \`stat
-f "%Y" /boot
/minix_latest\
``
51 [ -d $DIRSBASE ] && for i
in `ls $DIRSBASE/`
53 build_name
="`basename $i`"
54 if [ "$build_name" != "$latest" ]
56 echo "menu=Start MINIX 3 ($build_name):load_mods $DIRSBASE/$i/mod*;multiboot $DIRSBASE/$i/kernel rootdevname=$rootdevname" >> /$TMP
60 [ -r $LOCALCFG ] && cat $LOCALCFG | filter_missing_entries
>> $TMP