History log of /freebsd-9.3-release/usr.sbin/sysinstall/installUpgrade.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 209832 08-Jul-2010 randi

Revert r209787 pending further discussion.

Approved by: cperciva (mentor)


# 209069 11-Jun-2010 randi

Make sysinstall WARNS=2 clean.

Approved by: cperciva (mentor)
MFC after: 1 month


# 170320 05-Jun-2007 delphij

Write to slice name instead of directly to the disk device.
This fixes writing boot code upon upgrade.

PR: bin/61587
Submitted by: Nobuyuki Koganemaru <n-kogane syd.odn.ne.jp>
MFC after: 1 month


# 165720 01-Jan-2007 ceri

During an upgrade, if /boot/kernel.prev exists then the backup of
/boot/kernel can fail. Try to remove /boot/kernel.prev and cope the
best we can if that fails.

PR: bin/106376
Submitted by: Nobuyuki Koganemaru
Approved by: ru
MFC after: 2 weeks


# 165706 31-Dec-2006 ceri

Clarify a comment.


# 164172 11-Nov-2006 ceri

Fix a pair of user-visible typos.

Approved by: ru (mentor)


# 164171 11-Nov-2006 ceri

Back up /boot/kernel rather than /kernel for non-interactive upgrades.

Approved by: ru (mentor)
MFC after: 4 days


# 164170 11-Nov-2006 ceri

Add /lib and /libexec to the list of directories that have the schg
flag removed prior to an upgrade.

Approved by: ru (mentor)
MFC after: 4 days


# 164084 07-Nov-2006 ceri

Fix typos in comments.


# 159113 31-May-2006 ceri

Bring the "just copy" hit list closer to date.

Approved by: jhb
MFC after: 1 month


# 159112 31-May-2006 ceri

Update the location of the kernel for upgrades.

I considered leaving /boot/kernel out of the chflags noschg line, but I
seem to remember that there was a period where /boot/kernel was schg, so
have left it in for safety's sake.

Approved by: jhb
MFC after: 1 month


# 158296 04-May-2006 ceri

Fix binary upgrades by accounting for the schg flag on /var/empty.

PR: 96711, 96780
Submitted by: Nobuyuki Koganemaru, Martin Jackson
Approved by: re (scottl)
MFC after: 1 day


# 156123 28-Feb-2006 jhb

Fix numerous warnings. Aside from menu items in system.c and menu.c
this now compiles on i386 with WARNS?= 3. Most of the fixes included
adding missing 'static' keywords to internal functions, using fully-defined
terminators in statically defined arrays of structs, and various
signed vs unsigned mismatches. Also G/C'd unused configSecurity()
function.


# 152993 01-Dec-2005 philip

Preserve /etc/sysctl.conf when doing a binary update. This prevents, for
instance, the dreaded shared memory problem in PostgreSQL coming back to
haunt you after a binary update.

PR: 89817
Submitted by: edwin
MFC after: 2 days


# 111991 08-Mar-2003 markm

KerberosIV deorbit sequence: Un-teach sysinstall about KerberosIV. I'm
not 100% sure that I've done this in the right way. If folks want to
revisit this, please be my guest.


# 107318 27-Nov-2002 ru

Removed the vestiges of modems(5).

Approved by: re


# 98079 10-Jun-2002 obrien

Change our default XF86Config location from /etc/ to /etc/X11/,
following the lead of The XFree86 Project's default.

Approved by: Murray


# 95327 23-Apr-2002 obrien

Change the name of the 'bin' distribution to 'base'.
This is done since it contains much more than /bin, and also gets in the
way when making a combined install+fixit CD.

OK'ed by: jkh


# 93595 01-Apr-2002 obrien

Our persistent-state, large temporary file dir is /VAR/tmp, not /USR/tmp.


# 88515 26-Dec-2001 sheldonh

Add nsmb.conf to the resurrection list.

Submitted by: olgeni
Approved by: re


# 83020 04-Sep-2001 bmah

sysinstall's binary upgrade option used to display the contents of
UPGRADE.TXT along with a YesNo dialog requesting confirmation of
the upgrade. During the transition to RELNOTESng, UPGRADE.TXT got
folded into a file that eventually renders as INSTALL.TXT, which
makes sysinstall complain about a non-existent file. As a
solution/workaround, point the user at INSTALL.TXT, and then request
confirmation.

Noticed by: rpratt (on 4.4-RC3)
Approved by: jkh


# 82680 31-Aug-2001 jkh

Preserve /etc/hosts.allow and /etc/dhclient.conf during upgrades.

Noted by: Tim Zingelman <zingelman@fnal.gov>


# 79065 01-Jul-2001 dd

Introduce DEVICE_INIT, DEVICE_GET, and DEVICE_SHUTDOWN macros. As the
names suggest, they perform methods on Device's. In addition, they
check that the pointer passed to them is valid; if it isn't, they
pretend that the action failed. This fixes some crashes due to NULL
dereferences (e.g., PR 26509).

Approved by: jkh (some time ago)


# 74730 24-Mar-2001 jkh

Preserve ssh directory across upgrades.

Submitted by: Edwin Groothuis <edwin@mavetju.org>
PR: conf/25633


# 72787 21-Feb-2001 jkh

Properly preserve /etc/mail during upgrades.

PR: misc/23048
Submitted by: jack@germanium.xtalwind.net


# 68730 14-Nov-2000 jkh

Really turn off srcs for upgrades.


# 65532 06-Sep-2000 nectar

Add nsswitch support. By creating an /etc/nsswitch.conf file, you can
configure FreeBSD so that various databases such as passwd and group can be
looked up using flat files, NIS, or Hesiod.

= Hesiod has been added to libc (see hesiod(3)).

= A library routine for parsing nsswitch.conf and invoking callback
functions as specified has been added to libc (see nsdispatch(3)).

= The following C library functions have been modified to use nsdispatch:
. getgrent, getgrnam, getgrgid
. getpwent, getpwnam, getpwuid
. getusershell
. getaddrinfo
. gethostbyname, gethostbyname2, gethostbyaddr
. getnetbyname, getnetbyaddr
. getipnodebyname, getipnodebyaddr, getnodebyname, getnodebyaddr

= host.conf has been removed from src/etc. rc.network has been modified
to warn that host.conf is no longer used at boot time. In addition, if
there is a host.conf but no nsswitch.conf, the latter is created at boot
time from the former.

Obtained from: NetBSD


# 57509 26-Feb-2000 jkh

Be neater with the screen contents.


# 57236 15-Feb-2000 jkh

Include /usr/libexec in the list of upgrade targets by chflags'ing it first.


# 54587 14-Dec-1999 jkh

Completely rip-out and redesign sysinstall's refresh model as well
as redoing all the menus to have proper, or at least non-hallucinogenic,
keyboard accelerators.

This requires my recent update to libdialog to work properly and will
probably also exhibit some other "interesting" behavior while the last
few missing screen clears are found (which is why I'm not going to MFC
immediately). At least now, however, sysinstall does not gratuitously
redraw random screens at the drop of a hat and drive serial console
installers out of their minds.


# 50479 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 46994 11-May-1999 jkh

Preserve /root's dotfiles across upgrades too.

PR: 6559


# 45402 07-Apr-1999 jkh

Don't allow upgrade to touch /usr/src; only evil can result from
that kind of overlay smashing.


# 44890 19-Mar-1999 jkh

Add /etc/rc.firewall to list of "save after upgrade" targets.


# 44036 15-Feb-1999 jkh

Write out new boot blocks on upgrade.


# 43949 13-Feb-1999 jkh

Update to current state of /etc


# 43685 05-Feb-1999 jkh

Totally change the way variables are accounted for in sysinstall.
Now we know which variables are internal and which need to be
backed to /etc/rc.conf.site. rc.conf is not touched now.

Also kget kernel change information back properly and set up a loader.rc
file to use it.


# 41162 15-Nov-1998 jkh

o Break fixups into binary fixups and XFree86 based fixups.
o Move fixups into extraction routine so all consumers don't have to duplicate
the right behavior.
o Make some things more orthogonal (just for asthetics sake)
o Add option to go back and do it again if XF86Setup fails (possibly with
a different setup - this one has always annoyed me).


# 40841 03-Nov-1998 jkh

Deal with both foo.hlp and FOO.TXT files.


# 38594 27-Aug-1998 jkh

Add /usr/lib to the list of things to chflag before upgrading.
Noticed by: Blaz Zupan <blaz@gold.amis.net>


# 36320 24-May-1998 steve

Add 'newsyslog.conf' to the list of files to not clobber
during the upgrade process.

PR: 6629


# 34867 24-Mar-1998 jkh

Sync with 2.2-stable branch.


# 34811 23-Mar-1998 jkh

MF22: resync.


# 34733 21-Mar-1998 jkh

MF22: install correct kernel


# 30832 29-Oct-1997 jkh

Do chflags properly even when running multi-user.


# 30345 12-Oct-1997 jkh

Separate the siamese twins that were the partition and label editor.
Now you can use one without entering the other and it will DTRT.
These changes just allowed me to do the most straight-forward new disk
installation I've ever managed with sysinstall.


# 30018 30-Sep-1997 jkh

Keep fingers off /etc files until they're properly backed up.
PR: 4636
Submitted by: Jack <jack@zeus.xtalwind.net>


# 29236 09-Sep-1997 jkh

Be more cautious about leaving user with a workable kernel during the
upgrade process.
Submitted by: Mikael Karpberg <karpen@ocean.campus.luth.se>


# 29222 08-Sep-1997 jkh

Make upgrade potentially a little less interactive.
Add and document new loadConfig function (sort of like a script #include).
Make TCP/IP setup far less chatty when it doesn't need to be.


# 25601 09-May-1997 jkh

Merge 1.33.2.12 from 2.2


# 25251 28-Apr-1997 jkh

Adapt to rc.conf file format.


# 24548 02-Apr-1997 jkh

Sync up to current state of development.


# 23647 11-Mar-1997 jkh

Merge all my sysinstall changes over to the 2.1 branch.

I just have this feeling... :)


# 23500 07-Mar-1997 jkh

YAMF22


# 22388 07-Feb-1997 jkh

It's easier to go forwards than backwards with this, and the RELENG_2_1_0
sysinstall was already broken (I think there's a PR for this somewhere).
This will require some additional changes elsewhere, like bringing in pw.


# 22072 28-Jan-1997 jkh

Do media initialization at correct time for upgrade too.
Update /stand.


# 21792 17-Jan-1997 jkh

Now that I know which parts of the installation really need it (since
there's no menu display bug to work around now), be far more selective
in my use of DITEM_RECREATE (which is slow and involves much screen I/O).


# 21728 15-Jan-1997 jkh

Put upgraded files in their own directory - using the suffix was a bad idea.


# 21726 15-Jan-1997 jkh

Register SLIP/PPP devices properly again.
Make the /etc resurrection more sensible for upgrade. No longer
quite so annoying.


# 21720 15-Jan-1997 jkh

Add some missing parameters to msgConfirm() which produced the effects
noted in PR#2454


# 21713 15-Jan-1997 jkh

Make upgrade allow reselection of failed media.


# 21710 15-Jan-1997 jkh

Make the FTP installation codepath a lot more defensive. Trap
bogus path and FTP I/O errors much earlier, offer retry possibilities
at steps along the way so you don't have to resume from the very beginning
again on a hard error.


# 21673 14-Jan-1997 jkh

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


# 20518 15-Dec-1996 jkh

make note of which /etc files need upgrading in installUpgrade rather
than asking the user to keep track of the list himself.


# 20208 08-Dec-1996 jkh

Several areas of improvement:
o Incorporate some of Tatsumi's bug fixes.
o Remove the xperimnt and commerce distribution items; they haven't
been actual distributions for awhile.
o Try to sanitize the device checking code a little more.
o Cosmetic work on the network code.


# 18830 09-Oct-1996 jkh

DTRT if ESC is hit in a Yes/No dialog.
Noticed-by: jfieber


# 18363 18-Sep-1996 jkh

Don't call copySelf() when upgrading.


# 17404 03-Aug-1996 jkh

Try to make screen update more efficient (less flickering) by more
judicious use of dialog_clear_norefresh().


# 17164 13-Jul-1996 jkh

Damn - looks like upgrade got broken along the way and it's not something
I usually test, so... :-( Guess we'll have to slide the tag forward on
these two files - Peter, could you do the honors? I've been up for the last
30 hours or so and I just *know* that any attempt on my part to do this would
probably end up deleting the entire repository somehow. :-)


# 17005 08-Jul-1996 jkh

Whoops! Now that I'm decompressing docs into /tmp, it's important to
make sure that /tmp is there first! :-) While I'm at it, clean up the
somewhat inexplicably bogus Mkdir() function.


# 16975 05-Jul-1996 jkh

Support compressed doc files again.
Add a few strategic screen clears.
Do a lot less wasted screen I/O in restoring screen contents that don't need
restoring.
Use tar instead of cp to back up /etc in installUpdate.
Don't panic when upgrade shell exits.


# 16887 01-Jul-1996 jkh

Make it plainer how to exit.


# 15972 28-May-1996 jkh

Sha-ZAM!

The root floppy is now gone. I shall not mourn its passing.
Everything we need is on boot.flp or the bindist.


# 15788 16-May-1996 jkh

Fix some long-standing malloc bugs in the package handling code (freeing garbage
in one place, leaking memory in another).

Add a facility to invoke subsystems directly by naming them on
sysinstall's command-line when running post-install. A replacement
for pkg_manage might, for example, be `/stand/sysinstall configPackages'

Fix bogon where upgrade shell was entered with tty modes spammed.

Fix bug with release name checking in ftp_strat. Turned a bunch of
bogus exit()s into proper calls to systemShutdown().


# 15439 28-Apr-1996 jkh

Add a new -fake argument to make sysinstall not actually change things while
I'm testing it.


# 15419 28-Apr-1996 jkh

Fix an ancient index list bug.
Make FTP re-initializion work.
Fix fix fix.


# 15383 25-Apr-1996 jkh

Quite a few changes:

1. Fix the last display bugs (I hope) by use of dialog rebuilds at stategic
points.
2. Clean up the distributions menus so that everybody (that's reasonable)
has All and Clear options for setting/clearing things en-masse.
3. Various attempts at display optimization.
4. Change the wording of the `Don't use Write!' dialogs to make them more
explicitly define when and when not to use the option.


# 15355 22-Apr-1996 jkh

Bring this into sync.

I still have a _very very annoying_ display bug which occurs when a menu
item causes a submenu to be displayed - the screen repaints for the original
menu (which is restored upon return from the submenu) are off by about 4
characters. I've tried restoring the screen, the cursor position, you name
it - same deal. Grrrr! This commit is my first step in trying to get someone
else to help me look into this one since I'm just tearing my hair out at this
point!


# 15242 13-Apr-1996 jkh

1. Update all the copyrights to delete useless clauses 3 and 4.
2. Change more of the menu code over to new system.
3. Streamline label editor.


# 15091 07-Apr-1996 jkh

Major surgery.

1. Use new dialog menu hacks (no strings, just arrays of dialogMenuItem structs)
so that I can create composite menus with radio/checkbox/... items in them,
removing some long-standing UI bogons in various menus. This work isn't
finished yet, but will be done in two phases. This is phase one.

2. Remove all the script installation stuff. I never got time to document it,
it was arcane and it just complicated much of the code. There are better
ways of doing this if I want to do auto-driven installations later.

3. Remove much dead code and otherwise attempt to remove as much historical
grot as possible so that this code is easier to hack on. This is also
a two-stage process, phase one of which is now complete.


# 12343 17-Nov-1995 jkh

Warn the user extra special for /etc/sysconfig.


# 12149 08-Nov-1995 jkh

o Use correct device for Wangtek tapes.
o Caution against use of `W' options in label/partition screens (dangerous!)
o Make various types of debugging dreck conditionalize on DEBUG flag
o Make a fake /var/db/mountdbtab file so new system doesn't complain
o Apply uniform permissions to entire /usr/X11R6 tree.
o Set erase character to ^H for all interactive commands.
o Don't panic if user exits upgrade shell, reboot.
o Document dangers of `W' options in help screens also.


# 12127 06-Nov-1995 jkh

Correct some *serious* brain-o's in the upgrade procedure. Thanks for
your patience, Julian!


# 12065 04-Nov-1995 jkh

Move MBR selection to write/quite stage of disk editor for a more logical
grouping.

Don't print geometry warning in "all disk" case.

Clean up some unnecessary newlines in confirmation messages.


# 12055 04-Nov-1995 jkh

Various tweaks to adjust things more to my liking. Also bring in Rich's
changes to update XFree86 to 3.1.2-S.


# 12025 03-Nov-1995 jkh

Lots-o-cleanup(tm):

1. Fix the bogon I introduced that made some root filesystems fail to be
made with `unable to make filesystem on sd1s1a' or some such error
message.

2. Latest installment in the never-ending chapter on making FTP do the right
thing on a cruel internet.

3. Make `express install' a truly express install and split off what it used
to do into a `novice install' that's even more geared to the novice
by asking questions in order, rather than forcing them through the menu
interface.

4. Make anonymous FTP setup truly DTRT.

5. Build lndir directly into sysinstall and make the novice install offer
to set up the ports tree. Also make the ports setup truly explanatory
about what it's doing, and always link the ports destination to /usr/ports
if necessary so that bsd.port.mk doesn't need to be tweaked.


# 11836 27-Oct-1995 jkh

Be more aggressive about writing out configuration files.


# 11804 26-Oct-1995 jkh

Sync up for this snapshot.


# 11799 26-Oct-1995 jkh

o Fix installUpgrade to start the holographic shell as well.
o Lots of documentation fixes.
o Rename FTP active to "FTP" and explain passive mode better.
o Make tcpip screen a bit more friendly.
o Literally dozens of nits.


# 11752 24-Oct-1995 jkh

Make upgrades actually work (thanks, Julian).
Many other bug fixes.


# 11718 23-Oct-1995 jkh

Reshuffle the network config code a little so that it's actually
usable. Also fix the package extraction code.


# 11673 22-Oct-1995 jkh

Second round of screen update changes. Now handle the yes/no dialogs
as well as the confirmation dialogs.


# 11672 22-Oct-1995 jkh

Style changes. Clear the screen before a lot of error dialogs so that they
don't bogusly restore the screen to the message that was the cause of the
abort. That resulted in lots of weird flickering dialog boxes that appeared
to be displayed out of sequence.


# 11585 20-Oct-1995 jkh

Sync for Westhill build.


# 11584 20-Oct-1995 jkh

Fix fix.


# 11582 20-Oct-1995 jkh

More bug fixing, make debug settable two ways, put more meat into
the upgrade.


# 11569 19-Oct-1995 jkh

Sync.


# 11568 19-Oct-1995 jkh

Drat! Forgot the adds..