summaryrefslogtreecommitdiff
path: root/usr.sbin/sysmerge/sysmerge.sh
AgeCommit message (Collapse)Author
2012-03-19Use $() instead of backticks.Antoine Jacoutot
2011-10-09add a missing newline when you merge login.conf if login.conf.db doesn't existStuart Henderson
ok aja@
2011-09-01Fix the display of running utilities (e.g. don't say we are runningAntoine Jacoutot
makemap when we are in fact running newaliases...). No functionnal change.
2011-08-03Remove the 'obsolete file(s)' feature. It may come back at some pointAntoine Jacoutot
(doubtful) but since files tend to move from one set to another sysmerge would end up tagging them as obsolete. I see no way to fix this... req. by and ok deraadt@, ok landry sthen@
2011-07-11EDITOR or VISUAL are not a path. They are a string that needs to beTheo de Raadt
added to the front of the file, then sent through system() of equiv. ok aja
2011-07-11use more XXX for mktemp; ok ajacoutotTheo de Raadt
2011-07-06Harden the checks on the provided sets/src to make sure they are legit.Antoine Jacoutot
ok sthen@
2011-07-06Consistency in stdout redirections.Antoine Jacoutot
2011-07-06Indent, no change.Antoine Jacoutot
2011-07-05Make it possible to pass https:// and file:// (along with ftp:// andAntoine Jacoutot
http://) so that sysmerge(8) can work with URLs we use in the install script. ok sthen@
2011-05-09Installing -> Updating.Antoine Jacoutot
Update copyright year while here.
2011-05-08Make sure /etc/group and /etc/master.passwd are handled first in case weAntoine Jacoutot
need to install files or directories with newly added user/group ownerships. ok sthen@ (on a slightly different diff)
2011-05-06If it doesn't exist, create the directory holding the link we are aboutAntoine Jacoutot
to create, otherwise sysmerge will fail installing it. This can happen for example when you only installed etcXX but run sysmerge against both etcXX and xetcXX. found the hard way by and ok sthen@
2011-04-27Cosmetic:Antoine Jacoutot
* "Installing foo" -> "{Merging,Upgrading} foo" where it makes sense * remove the "it will remain to merge by hand" msg, too chatty and we already tell the user at the end of a sysmerge run if some files are still left to handle ok sthen@
2011-04-21Oopsy.Antoine Jacoutot
2011-04-21Better detection of obsolete files (naddy@ reported a false positive).Antoine Jacoutot
help from and ok naddy@
2011-04-20Enhance sysmerge(8) output so that it is more readable and make it moreAntoine Jacoutot
clear if there are any warning/error or things that should be handled manually. e.g. output from going from 4.8 to current: # sysmerge -s etc49.tgz -x xetc49.tgz ===> Populating temporary root under /var/tmp/sysmerge.k1BnD/temproot ===> Starting comparison ===> Installing /.profile ===> Installing /etc/bgpd.conf <...> ===> Installing /root/.profile ===> Installing /var/www/conf/mime.types ===> Comparison complete ===> Checking directory hierarchy permissions (running mtree(8)) ===> Output log available at /var/tmp/sysmerge.k1BnD/sysmerge.log *** WARNING: file(s) detected as obsolete: /etc/portal.conf /etc/security /var/msgs/bounds *** WARNING: some new/updated file(s) may require a reboot feedback and ok sthen@
2011-04-18Fix a bug where OBSOLETE_FILES would contain only the last appendedAntoine Jacoutot
occurence. with a small tweak from an ok sthen@
2010-11-11Unconfuse usage.Antoine Jacoutot
prodded by and ok espie@, ok jmc@
2010-11-08No need to differentiate newly installed files versus automaticallyAntoine Jacoutot
updated files in the output, this is confusing. ok sthen@
2010-11-04Make sure we don't end up using /usr/src/etc if we forget to pass theAntoine Jacoutot
correct option (e.g. 'sysmerge /tmp/etc48.tgz'). Use OPTIND as all args are handled by getopts we can catch misusage and we exit with an error. from Brian Poole, thanks. ok sthen@
2010-08-21Display usage information as well as the error when a path toStuart Henderson
src/*.tgz isn't specified. ok ajacoutot@
2010-07-20Instead of checking for the *etcXX.tgz filename, check whether theAntoine Jacoutot
tarball contains ./var/db/sysmerge/etcsum or ./var/db/sysmerge/xetcsum. First, it's more correct and second it allows people to rename the sets without sysmerge bailing out. feature requested and tested by oga@
2010-07-17When running in full diff mode, don't wait for user input beforeAntoine Jacoutot
starting the comparison anymore. It does not bring us anything and allows to chop 30 lines of the script. While here, remove some empty lines.
2010-07-06Add a blank line between sections in the output log, it's more readable.Antoine Jacoutot
2010-07-05Automatically install missing users and groups.Antoine Jacoutot
(does *NOT* touch existing users/groups) "I like it" from several... inputs from sthen@ and halex@ ok krw@ halex@ sthen@
2010-06-27Suggest a reboot if "sh MAKEDEV" was run or login.conf was modified.Antoine Jacoutot
reported by matthieu@ req. by and "I like it" deraadt@
2010-02-06Remove newly generated sum file(s) if it did not exist before and trapAntoine Jacoutot
is called. While here, change shebang to /bin/ksh to reflect reality and bump copyright year. "checkbashisms says yes. :-)" && ok sthen@
2010-01-13- move the separator so it's just displayed for files with diffs toStuart Henderson
review, specifically it's now not printed for every auto-installed file, giving a much more compact output. ok ajacoutot@ - skip the blank line before 'Comparison complete' suggested by ajacoutot.
2009-12-18xargs takes the whole list as argument, so no need to append.Antoine Jacoutot
ok sthen@
2009-12-18Add etcsum and xetcsum to IGNORE_FILES. Needed for upcoming change.Antoine Jacoutot
ok sthen@
2009-12-06Add /var/db/locate.database and /var/games/tetris.scores to IGNORE_FILES.Antoine Jacoutot
ok sthen@
2009-10-02Use BSD.x11.dist mtree file now that it is up-to-date and maintained.Antoine Jacoutot
ok sthen@
2009-08-24Harden variables setting, prodded by alex@Antoine Jacoutot
Fix TMPDIR while here and remove the EDITOR definition, it is only used once. ok sthen@
2009-08-18HEADS-UP: change the way sysmerge(8) runs by default.Antoine Jacoutot
Remove the '-a' switch (auto-mode) and make this behaviour the default. Add a new '-d' switch to get former default (full diff) mode. General idea ok for several. man page improvements from jmc@ ok jim@ oga@ sobrado@ ok sthen@ "sane defaults++ :)"
2009-08-17Don't try to move files that don't exist.Antoine Jacoutot
2009-08-16Properly initialize the array setting auto-upgradable files.Antoine Jacoutot
ok sthen@
2009-06-28Fix small regression introduced with symlinks handling.Antoine Jacoutot
spotted by jmc@
2009-06-28Remove useless blank space in output.Antoine Jacoutot
2009-06-28Teach sysmerge to deal with links (found the hard way when I realised IAntoine Jacoutot
missed some very much needed symlinks under /etc/fonts/conf.d/). The behaviour is the following, if a link does not exist: * in '-a' mode, it is created automatically * in normal mode, sysmerge will ask what you want to do If one wants to use '-a' mode while still being in control of what links are created, sysmerge.ignore can be used. "sounds good to" phessler@, ok sthen@
2009-06-14DBDIR resides in DESTDIR.Antoine Jacoutot
ok sthen@
2009-06-04When in auto-mode, automatically install binary files (from the X set).Antoine Jacoutot
``please put it in'', pyr@
2009-05-13Remove unused args from getopts.Antoine Jacoutot
Remove top comments already duplicated in the man page. "sure" sthen@
2009-05-12- tweak the description of -aJason McIntyre
- remove -SX from usage() ok ajacoutot
2009-05-11This commit adds a new feature to sysmerge(8), usable in '-a' mode.Antoine Jacoutot
From now on, checksums of reference files (sets and/or src) will be stored under /var/db/sysmerge/{etcsum,xetcsum,srcsum} . This allows for "remembering last choice" several people have requested. This deprecates the need for -X and -S which have been removed (these switches may come back at some point for the auto-patch feature which halex@ proposed). It will only compare files which reference sources have changed since the last run and will attempt to automatically upgrade them to the newest version provided that they have no local changes. i.e. first run should dislay differences, second run should not display anything except if something changed between old and new sets/src. This way sysmerge can also warn you from files which may have been obsoleted. General idea taken from Net/FreeBSD but we're doing things differently. Intensively discussed with oga@, sthen@ and halex@ ok oga@ sthen@
2009-04-28Add the possibility to go back from merging mode to the previous menu.Antoine Jacoutot
Move unset NO_INSTALLED where it belongs, at the start of the function. Several minor cleanups. from Alexander Hall ok sthen@
2009-04-12Better output (i.e. /etc instead of //etc)Antoine Jacoutot
mostly from and ok sthen@
2009-04-12Treat /etc/hosts the same way as /etc/group and /etc/master.passwd: makeAntoine Jacoutot
it impossible to install a virgin one over the currently installed one. from Mitja Muzenic, with a tweak
2009-04-12When in automode, sysmerge will now automatically install filesAntoine Jacoutot
that only differ by CVS Id (adapted from FreeBSD mergemaster) Ground work on the man page, from jmc@ * do not duplicate info * rewordings * move some stuffs around ok jmc@ sthen@
2009-04-09Add a hook to deal with special sendmail db files under /etc/mail/Antoine Jacoutot
Tweak some outputs and put interesting messages into sysmerge.log. export the NEED_NEWALIASES variable. inputs from and ok sthen@