Bug#275882: os-prober: [patch]windows NT/2000/XP refinement
Package: os-prober
Severity: wishlist
*** Please type your report below this line ***
Please review and add the attached patch to os-prober.
The patch adds the following functionality:
detects if one or more windows NT/2000/XP are installed
- if are more than one long is set to 'Windows (loader)'
- if is just one long becomes the name of the windows os, as
specified in boot.ini
PS:this was sent to the debian-boot list but forgot to send it to
submit@bugs.debian.org, too
--
Regards,
EddyP
--- 20microsoft_orig 2004-10-10 20:01:39.000000000 +0300
+++ 20microsoft 2004-10-10 21:49:29.000000000 +0300
@@ -19,6 +19,18 @@
if [ -e "$2/ntldr" -a -e "$2/NTDETECT.COM" ]; then
long="Windows NT/2000/XP"
short=Windows
+ if [ -e "$2/boot.ini" ]; then
+ multicount=`grep -e "^multi" boot.ini | wc -l`
+ scsicount=`grep -e "^scsi" boot.ini | wc -l`
+ msoscount=`expr ${multicount} + ${scsicount}`
+ if [ $msoscount -eq 1 ]; then
+ defaultmspart=`grep -e "^default" $2/boot.ini | cut -d '=' -f2 | cut -d '\' -f1`
+ echo "defaultmspart = ${defaultmspart}"
+ long=`grep -e "^$defaultmspart" $2/boot.ini | cut -d '"' -f2`
+ else
+ long='Windows (loader)'
+ fi
+ fi
# MS-DOS
elif [ -d "$2/dos" ]; then
long="MS-DOS 5.x/6.x/Win3.1"
Reply to: