diff --git a/distrib/utils/sysinst/upgrade.c b/distrib/utils/sysinst/upgrade.c index a14e0f3ede8b..cdd9f9b65f78 100644 --- a/distrib/utils/sysinst/upgrade.c +++ b/distrib/utils/sysinst/upgrade.c @@ -1,4 +1,4 @@ -/* $NetBSD: upgrade.c,v 1.9 1997/11/05 07:28:37 jonathan Exp $ */ +/* $NetBSD: upgrade.c,v 1.10 1997/11/06 09:02:36 jonathan Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -48,8 +48,9 @@ /* * local prototypes */ -void check_prereqs(void); -int save_etc(void); +void check_prereqs __P((void)); +int save_etc __P((void)); +int merge_etc __P((void)); /* Do the system upgrade. */ void do_upgrade(void) @@ -85,6 +86,9 @@ void do_upgrade(void) get_and_unpack_sets(MSG_upgrcomplete, MSG_abortupgr); + /* Copy back any files we shuld restore after the upgrade.*/ + merge_etc(); + sanity_check(); } @@ -144,3 +148,16 @@ int save_etc(void) return 0; } + + +/* + * Merge back saved target /etc files after unpacking the new + * sets has completed. + */ +int merge_etc(void) +{ + /* just move back fstab, so we can boot cleanly. */ + cp_within_target("/etc.old/fstab", "/etc/"); + + return 0; +} diff --git a/distrib/utils/sysinst/util.c b/distrib/utils/sysinst/util.c index aa66d99073ea..88adf84601e3 100644 --- a/distrib/utils/sysinst/util.c +++ b/distrib/utils/sysinst/util.c @@ -1,4 +1,4 @@ -/* $NetBSD: util.c,v 1.17 1997/11/05 23:32:54 phil Exp $ */ +/* $NetBSD: util.c,v 1.18 1997/11/06 09:02:37 jonathan Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -415,12 +415,12 @@ struct check_table { const char *testarg; const char *path;} checks[] = { */ static int check_for(const char *type, const char *pathname) { - int result; + int found; - result = (target_test(type, pathname) == 0); - if (result != 0) + found = (target_test(type, pathname) == 0); + if (found == 0) msg_display(MSG_rootmissing, pathname); - return result; + return found; } int