--- kdm-3.5.3.orig/kdm/backend/bootman.c 2005-09-10 10:26:12.000000000 +0200 +++ kdm-3.5.3/kdm/backend/bootman.c 2006-07-07 22:09:08.000000000 +0200 @@ -82,7 +82,7 @@ int len; char line[1000]; - if (!grub && !(grub = locate( "grub" ))) + if (!grub && !(grub = locate( "grub-set-default" ))) return BO_NOMAN; *def = 0; @@ -130,19 +130,14 @@ static void commitGrub( void ) { - FILE *f; - int pid; - static const char *args[] = { 0, "--batch", "--no-floppy", 0 }; - + char command[256]; + if (sdRec.bmstamp != mTime( GRUB_MENU ) && setGrub( sdRec.osname, &sdRec ) != BO_OK) return; - args[0] = grub; - if ((f = pOpen( (char **)args, 'w', &pid ))) { - fprintf( f, "savedefault --default=%d --once\n", sdRec.osindex ); - pClose( f, pid ); - } + sprintf(command, "%s %d", grub, sdRec.osindex); + system(command); } static char *lilo;