]> Zhao Yanbai Git Server - minix.git/commitdiff
update_bootcfg: fix: generate absolute paths
authorBen Gras <ben@minix3.org>
Wed, 18 Apr 2012 14:30:06 +0000 (16:30 +0200)
committerBen Gras <ben@minix3.org>
Wed, 18 Apr 2012 14:30:06 +0000 (16:30 +0200)
commands/update_bootcfg/update_bootcfg.sh

index 8c653b694a25104bbc28fa12b719285c17f8502b..dc443ac5f8cdb3504e9f384c684913d90e49b62d 100755 (executable)
@@ -5,6 +5,7 @@ ROOT=`printroot -r`
 DEFAULTCFG=/etc/boot.cfg.default
 LOCALCFG=/etc/boot.cfg.local
 TMP=/boot.cfg.temp
+DIRSBASE=/boot/minix
 
 filter_missing_entries()
 {
@@ -47,12 +48,12 @@ then
        latest=`basename \`stat -f "%Y" /boot/minix_latest\``
 fi
 
-[ -d /boot/minix ] && for i in `ls /boot/minix/`
+[ -d $DIRSBASE ] && for i in `ls $DIRSBASE/`
 do
        build_name="`basename $i`"
        if [ "$build_name" != "$latest" ]
        then
-               echo "menu=Start MINIX 3 ($build_name):load_mods $i/mod*;multiboot $i/kernel rootdevname=$rootdevname" >> /$TMP
+               echo "menu=Start MINIX 3 ($build_name):load_mods $DIRSBASE/$i/mod*;multiboot $DIRSBASE/$i/kernel rootdevname=$rootdevname" >> /$TMP
        fi
 done