diff -ur 20010612/distrib/utils/sysinst/arch/macppc/md.c src/distrib/utils/sysinst/arch/macppc/md.c --- 20010612/distrib/utils/sysinst/arch/macppc/md.c Sun Jan 14 20:22:26 2001 +++ src/distrib/utils/sysinst/arch/macppc/md.c Sun Jun 24 05:53:38 2001 @@ -138,11 +138,25 @@ { const char *bootfile = target_expand("/boot"); /*XXX*/ + if (md_get_info()) { + + printf ("Proceeding for installboot.\n"); +process_menu(MENU_noyes); + if (!yesno) { msg_display(MSG_abort); + process_menu(MENU_ok); + return 0;} + printf (msg_string(MSG_dobootblks), diskdev); cp_to_target("/usr/mdec/ofwboot", "/boot"); sync(); run_prog(RUN_DISPLAY, NULL, "/usr/mdec/installboot %s %s /dev/r%sa", bootfile, "/usr/mdec/bootxx", diskdev); + } + else { + printf (msg_string(MSG_applelabelexists), diskdev); + printf ("Label looks like Apples one. Will not run installboot\n"); +process_menu(MENU_noyes);} + return 0; } @@ -163,6 +177,8 @@ char isize[20]; int maxpart = getmaxpartitions(); + struct disklabel disklabel; + /* * Initialize global variables that track space used on this disk. * Standard 4.3BSD 8-partition labels always cover whole disk. @@ -318,7 +334,24 @@ remain = fsdsize - partstart; part++; } + case 4: /* Use Existing */ + if (get_real_geom(diskdev,&disklabel ) == 0) { + msg_display(MSG_abort); /* XXX more informative */ + } + for (i = 0; i < maxpart; i++) { +#define p disklabel.d_partitions[i] + bsdlabel[i].pi_size = p.p_size; + bsdlabel[i].pi_offset = p.p_offset; + if (i != RAW_PART) { + bsdlabel[i].pi_fstype = p.p_fstype; + bsdlabel[i].pi_bsize = p.p_fsize * p.p_frag; + bsdlabel[i].pi_fsize = p.p_fsize; + /* menu to get fsmount[] entry */ +#undef p + } else + bsdlabel[i].pi_fstype = FS_UNUSED; + } break; } diff -ur 20010612/distrib/utils/sysinst/arch/macppc/menus.md.en src/distrib/utils/sysinst/arch/macppc/menus.md.en --- 20010612/distrib/utils/sysinst/arch/macppc/menus.md.en Sat Jan 13 02:24:04 2001 +++ src/distrib/utils/sysinst/arch/macppc/menus.md.en Sun Jun 24 06:06:01 2001 @@ -53,6 +53,14 @@ option "Change f", action { editpart = F;}, sub menu edfspart; option "Change g", action { editpart = G;}, sub menu edfspart; option "Change h", action { editpart = H;}, sub menu edfspart; + option "Change i", action { editpart = I;}, sub menu edfspart; + option "Change j", action { editpart = J;}, sub menu edfspart; + option "Change k", action { editpart = K;}, sub menu edfspart; + option "Change l", action { editpart = L;}, sub menu edfspart; + option "Change m", action { editpart = M;}, sub menu edfspart; + option "Change n", action { editpart = N;}, sub menu edfspart; + option "Change o", action { editpart = O;}, sub menu edfspart; + option "Change p", action { editpart = P;}, sub menu edfspart; option "Set new allocation size", action { reask_sizemult(dlcylsize); }; menu md_distcustom, x=26, y=5, exit, title "Selection toggles inclusion"; diff -ur 20010612/distrib/utils/sysinst/arch/macppc/msg.md.en src/distrib/utils/sysinst/arch/macppc/msg.md.en --- 20010612/distrib/utils/sysinst/arch/macppc/msg.md.en Sat Jan 13 02:24:04 2001 +++ src/distrib/utils/sysinst/arch/macppc/msg.md.en Sun Jun 17 18:44:02 2001 @@ -80,3 +80,7 @@ message askfspart {The next partition is /dev/%s%c. You have %d %s left on your disk. Partition size? } + +message applelabelexists +{The Apple type partition label found on %s. Install boot will no be +done } diff -ur 20010612/distrib/utils/sysinst/disks.c src/distrib/utils/sysinst/disks.c --- 20010612/distrib/utils/sysinst/disks.c Mon Jan 15 20:37:20 2001 +++ src/distrib/utils/sysinst/disks.c Sun Jun 24 06:32:47 2001 @@ -71,6 +71,8 @@ static int target_mount_with_error_menu(const char *opt, char *diskpart, const char *mntpt); +/* int hfs_exist (const char *, partinfo *);*/ +static int hfs_exist (const char *); static void get_disks(void) @@ -235,12 +237,34 @@ write_disklabel (void) { +#if 0 #ifdef DISKLABEL_CMD /* disklabel the disk */ return run_prog(RUN_DISPLAY, MSG_cmdfail, "%s %s %s", DISKLABEL_CMD, diskdev, bsddiskname); #endif return 0; +#else +/* +For macppc only, check if HFS partition exists and if found, +not to write disk label +*/ +if ( hfs_exist(diskdev)) { + printf("HFS partition exists,\nskip writing disklabel\n"); + sleep (2); + return 0; + } + else { + printf ("HFS partition DOES NOT exist, writing disklabel\n"); + sleep (2); +#ifdef DISKLABEL_CMD + /* disklabel the disk */ + return run_prog(RUN_DISPLAY, MSG_cmdfail, + "%s %s %s", DISKLABEL_CMD, diskdev, bsddiskname); +#endif + return 0; + } +#endif } int @@ -670,3 +694,27 @@ int layout_swap, layout_usr, layout_tmp, layout_var, layout_home; +/* added for macppc only*/ +int +hfs_exist(dev) + const char *dev; +{ + /* partinfo parts[16]; */ + int i, maxpart; + int hfs = 0; + /* + if (pp == NULL) { + emptylabel(parts); + if (incorelabel(dev, parts) < 0) + return -1; + } + */ + maxpart = getmaxpartitions(); + printf(" ** maxpart(%d)\n",maxpart); + for (i = 0; i < maxpart; i++) { + if (bsdlabel[i].pi_fstype == FS_HFS) { + hfs++; + } + } + return hfs; +} diff -ur 20010612/distrib/utils/sysinst/main.c src/distrib/utils/sysinst/main.c --- 20010612/distrib/utils/sysinst/main.c Thu Jun 7 19:10:59 2001 +++ src/distrib/utils/sysinst/main.c Sat Jan 13 02:23:49 2001 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.25 2001/06/06 23:12:49 scottr Exp $ */ +/* $NetBSD: main.c,v 1.24 2000/12/22 10:12:13 mrg Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -256,7 +256,6 @@ static char *ftp_prefix_ptr = ftp_prefix; static char *ftp_user_ptr = ftp_user; static char *ftp_pass_ptr = ftp_pass; -static char *ftp_proxy_ptr = ftp_proxy; static char *nfs_host_ptr = nfs_host; static char *nfs_dir_ptr = nfs_dir; static char *cdrom_dev_ptr = cdrom_dev; @@ -279,8 +278,6 @@ STRSIZE, NULL}, {"ftp user", "ftp user = %s", "a $0", &ftp_user_ptr, 1, STRSIZE, NULL}, {"ftp pass", "ftp pass = %s", "a $0", &ftp_pass_ptr, 1, STRSIZE, NULL}, - {"ftp proxy", "ftp proxy = %s", "a $0", &ftp_proxy_ptr, 1, STRSIZE, - NULL}, {"nfs host", "nfs host = %s", "a $0", &nfs_host_ptr, 1, STRSIZE, NULL}, {"nfs dir", "ftp dir = %s", "a $0", &nfs_dir_ptr, 1, STRSIZE, NULL}, {"cd dev", "cd dev = %s", "a $0", &cdrom_dev_ptr, 1, STRSIZE, NULL}, diff -ur 20010612/distrib/utils/sysinst/menus.mi.en src/distrib/utils/sysinst/menus.mi.en --- 20010612/distrib/utils/sysinst/menus.mi.en Thu Jun 7 19:11:00 2001 +++ src/distrib/utils/sysinst/menus.mi.en Sun Jan 14 20:22:14 2001 @@ -1,4 +1,4 @@ -/* $NetBSD: menus.mi.en,v 1.46 2001/06/06 23:12:49 scottr Exp $ */ +/* $NetBSD: menus.mi.en,v 1.45 2001/01/14 02:38:14 mrg Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -274,7 +274,7 @@ { msg_clear(); msg_table_add (MSG_ftpsource, ftp_host, ftp_dir, ftp_user, strcmp(ftp_user, "ftp") == 0 ? ftp_pass : - strlen(ftp_pass) != 0 ? "** hidden **" : "", ftp_proxy); + strlen(ftp_pass) != 0 ? "** hidden **" : ""); }; option "Host", action { msg_prompt (MSG_host, ftp_host, ftp_host, 255); }; @@ -288,13 +288,6 @@ else { msg_prompt_noecho (MSG_passwd, "", ftp_pass, 255); } - }; - option "Proxy", action - { msg_prompt (MSG_proxy, ftp_proxy, ftp_proxy, 255); - if (strcmp(ftp_proxy, "") == 0) - unsetenv("ftp_proxy"); - else - setenv("ftp_proxy", ftp_proxy, 1); }; option "Get Distribution", exit; diff -ur 20010612/distrib/utils/sysinst/menus.mi.fr src/distrib/utils/sysinst/menus.mi.fr --- 20010612/distrib/utils/sysinst/menus.mi.fr Thu Jun 7 19:11:00 2001 +++ src/distrib/utils/sysinst/menus.mi.fr Sun Jan 14 20:22:14 2001 @@ -1,4 +1,4 @@ -/* $NetBSD: menus.mi.fr,v 1.32 2001/06/06 23:12:49 scottr Exp $ */ +/* $NetBSD: menus.mi.fr,v 1.31 2001/01/14 02:38:15 mrg Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -242,8 +242,7 @@ { msg_clear(); msg_table_add (MSG_ftpsource, ftp_host, ftp_dir, ftp_user, strcmp(ftp_user, "ftp") == 0 ? ftp_pass : - strlen(ftp_pass) != 0 ? "** caché **" : "", - ftp_proxy); + strlen(ftp_pass) != 0 ? "** caché **" : ""); }; option "Serveur ftp", action { msg_prompt (MSG_host, ftp_host, ftp_host, 255); }; @@ -257,13 +256,6 @@ else { msg_prompt_noecho (MSG_passwd, "", ftp_pass, 255); } - }; - option "Proxy", action - { msg_prompt (MSG_proxy, ftp_proxy, ftp_proxy, 255); - if (strcmp(ftp_proxy, "") == 0) - unsetenv("ftp_proxy"); - else - setenv("ftp_proxy", ftp_proxy, 1); }; option "Récupérer la Distribution", exit; diff -ur 20010612/distrib/utils/sysinst/msg.mi.en src/distrib/utils/sysinst/msg.mi.en --- 20010612/distrib/utils/sysinst/msg.mi.en Thu Jun 7 19:11:00 2001 +++ src/distrib/utils/sysinst/msg.mi.en Wed Apr 25 19:23:56 2001 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.mi.en,v 1.83 2001/06/06 23:12:49 scottr Exp $ */ +/* $NetBSD: msg.mi.en,v 1.82 2001/04/25 02:33:10 simonb Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -398,7 +398,6 @@ directory: %s user: %s password: %s -proxy: %s } message host @@ -412,9 +411,6 @@ message passwd {password} - -message proxy -{proxy} message email {e-mail address} diff -ur 20010612/distrib/utils/sysinst/msg.mi.fr src/distrib/utils/sysinst/msg.mi.fr --- 20010612/distrib/utils/sysinst/msg.mi.fr Thu Jun 7 19:11:00 2001 +++ src/distrib/utils/sysinst/msg.mi.fr Sun Jan 14 20:22:14 2001 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.mi.fr,v 1.41 2001/06/06 23:12:50 scottr Exp $ */ +/* $NetBSD: msg.mi.fr,v 1.40 2001/01/14 02:38:15 mrg Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -392,7 +392,6 @@ répertoire: %s utilisateur: %s mot de passe: %s -proxy: %s } message host @@ -406,9 +405,6 @@ message passwd {mot de passe} - -message proxy -{proxy} message email { adresse e-mail } diff -ur 20010612/distrib/utils/sysinst/net.c src/distrib/utils/sysinst/net.c --- 20010612/distrib/utils/sysinst/net.c Fri Jun 8 19:12:20 2001 +++ src/distrib/utils/sysinst/net.c Tue May 8 19:12:11 2001 @@ -1,4 +1,4 @@ -/* $NetBSD: net.c,v 1.75 2001/06/07 12:34:55 mrg Exp $ */ +/* $NetBSD: net.c,v 1.74 2001/05/07 11:49:52 itojun Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -628,11 +628,6 @@ "/sbin/route -n add default %s", net_defroute); } - - /* - * wait a couple of seconds for the interface to go live. - */ - sleep(5); /* * ping should be verbose, so users can see the cause diff -u 20010612/distrib/utils/sysinst/arch/macppc/md.c src/distrib/utils/sysinst/arch/macppc/md.c --- 20010612/distrib/utils/sysinst/arch/macppc/md.c Sun Jan 14 20:22:26 2001 +++ src/distrib/utils/sysinst/arch/macppc/md.c Sun Jun 24 05:53:38 2001 @@ -138,11 +138,25 @@ { const char *bootfile = target_expand("/boot"); /*XXX*/ + if (md_get_info()) { + + printf ("Proceeding for installboot.\n"); +process_menu(MENU_noyes); + if (!yesno) { msg_display(MSG_abort); + process_menu(MENU_ok); + return 0;} + printf (msg_string(MSG_dobootblks), diskdev); cp_to_target("/usr/mdec/ofwboot", "/boot"); sync(); run_prog(RUN_DISPLAY, NULL, "/usr/mdec/installboot %s %s /dev/r%sa", bootfile, "/usr/mdec/bootxx", diskdev); + } + else { + printf (msg_string(MSG_applelabelexists), diskdev); + printf ("Label looks like Apples one. Will not run installboot\n"); +process_menu(MENU_noyes);} + return 0; } @@ -163,6 +177,8 @@ char isize[20]; int maxpart = getmaxpartitions(); + struct disklabel disklabel; + /* * Initialize global variables that track space used on this disk. * Standard 4.3BSD 8-partition labels always cover whole disk. @@ -318,7 +334,24 @@ remain = fsdsize - partstart; part++; } + case 4: /* Use Existing */ + if (get_real_geom(diskdev,&disklabel ) == 0) { + msg_display(MSG_abort); /* XXX more informative */ + } + for (i = 0; i < maxpart; i++) { +#define p disklabel.d_partitions[i] + bsdlabel[i].pi_size = p.p_size; + bsdlabel[i].pi_offset = p.p_offset; + if (i != RAW_PART) { + bsdlabel[i].pi_fstype = p.p_fstype; + bsdlabel[i].pi_bsize = p.p_fsize * p.p_frag; + bsdlabel[i].pi_fsize = p.p_fsize; + /* menu to get fsmount[] entry */ +#undef p + } else + bsdlabel[i].pi_fstype = FS_UNUSED; + } break; } diff -u 20010612/distrib/utils/sysinst/arch/macppc/menus.md.en src/distrib/utils/sysinst/arch/macppc/menus.md.en --- 20010612/distrib/utils/sysinst/arch/macppc/menus.md.en Sat Jan 13 02:24:04 2001 +++ src/distrib/utils/sysinst/arch/macppc/menus.md.en Sun Jun 24 06:06:01 2001 @@ -53,6 +53,14 @@ option "Change f", action { editpart = F;}, sub menu edfspart; option "Change g", action { editpart = G;}, sub menu edfspart; option "Change h", action { editpart = H;}, sub menu edfspart; + option "Change i", action { editpart = I;}, sub menu edfspart; + option "Change j", action { editpart = J;}, sub menu edfspart; + option "Change k", action { editpart = K;}, sub menu edfspart; + option "Change l", action { editpart = L;}, sub menu edfspart; + option "Change m", action { editpart = M;}, sub menu edfspart; + option "Change n", action { editpart = N;}, sub menu edfspart; + option "Change o", action { editpart = O;}, sub menu edfspart; + option "Change p", action { editpart = P;}, sub menu edfspart; option "Set new allocation size", action { reask_sizemult(dlcylsize); }; menu md_distcustom, x=26, y=5, exit, title "Selection toggles inclusion"; diff -u 20010612/distrib/utils/sysinst/arch/macppc/msg.md.en src/distrib/utils/sysinst/arch/macppc/msg.md.en --- 20010612/distrib/utils/sysinst/arch/macppc/msg.md.en Sat Jan 13 02:24:04 2001 +++ src/distrib/utils/sysinst/arch/macppc/msg.md.en Sun Jun 17 18:44:02 2001 @@ -80,3 +80,7 @@ message askfspart {The next partition is /dev/%s%c. You have %d %s left on your disk. Partition size? } + +message applelabelexists +{The Apple type partition label found on %s. Install boot will no be +done }