[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#275882: os-prober: [patch]windows NT/2000/XP refinement



tags 275882 + patch d-i
thanks

(The patch is against os-prober/os-probes/mounted/i386/20microsoft)

Some small corrections/suggestions on this patch:
- the count for multi and scsi should have 'grep -q -e'
- maybe long="Windows NT/2000/XP (loader)" instead of just "Windows (loader)"

Also (from #debian-boot):
[21:22:49] <fjp> I think you should use debug instead of echo and maybe 
long="Windows NT/2000/XP (loader)" instead of just "Windows (loader)"
[21:35:25] <eddyp> fjp: about the patch, the echo shouldn't be there, sorry

An updated patch is attached.

--- 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 -q -e "^multi" boot.ini | wc -l`
+    scsicount=`grep -q -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`
+	long=`grep -e "^$defaultmspart" $2/boot.ini | cut -d '"' -f2`
+    else
+	long='Windows NT/2000/XP (loader)'
+    fi
+  fi
 # MS-DOS
 elif [ -d "$2/dos" ]; then
   long="MS-DOS 5.x/6.x/Win3.1"

Reply to: