summaryrefslogtreecommitdiff
path: root/usr.sbin/sysmerge
AgeCommit message (Collapse)Author
2013-09-10Add support for the SM_PATH environment variable. This changes theAntoine Jacoutot
default behavior of sysmerge when no source is specified on the command line: * if SM_PATH is set, then sysmerge will search this path for etcXX.tgz and/or xetcXX.tgz * if SM_PATH is not set (the default), then the behaviour is the same as before and /usr/src is used idea from espie@ man page refactoring jmc@ (who else :-)) "good idea" krw@ ok rpe@ landry@ espie@
2013-07-16use .Mt for email addresses; from Jan Stary <hans at stare dot cz>; ok jmc@Ingo Schwarze
2013-03-22Do not register symlinks in the sum files. This makes no sense and makesAntoine Jacoutot
sysmerge(8) output a warning when the target of the link does not yes exist on the system. ok sthen@
2013-03-02Always compare aliases(5) at the end of the sysmerge(8) run after allAntoine Jacoutot
files have already been merged. This is needed in the case where the syntax of smtpd.conf changed to prevent newaliases(8) from failing. issue reported by todd@ ok sthen@
2013-01-25Rename some functions and bump copyright.Antoine Jacoutot
No functionnal change.
2013-01-04simplify chroot casesRobert Peichaer
ok ajacoutot@
2013-01-03Refactor code for extracting and checksumming of (x)etcXX.tgz setsRobert Peichaer
or preparing from /usr/src into extract_set() and prepare_src(). - extend error handling and quoting of user supplied input - move and rename get_sets() to get_set(), change parameter order and allow arbitrary filenames in url pattern (see r1.62 msg) ok halex@, 'go ahead' ajacoutot@
2012-12-26correction of the SRCDIR checkRobert Peichaer
2012-12-26Combine almost identical code for fetching and checking of theRobert Peichaer
etcXX.tgz/xetcXX.tgz sets into a more generic function get_sets(). Move the SRCDIR check into the getopts while-loop as well. ok ajacoutot@ halex@
2012-12-25replace one grep with awk patterns and simplify another using -qRobert Peichaer
ok ajacoutot@
2012-12-24simplify things by using shell patternsRobert Peichaer
ok ajacoutot@ halex@
2012-12-23simplify setting FETCH_CMD and move it upwards to where the otherRobert Peichaer
global variables are defined ok ajacoutot@
2012-12-19use (()) for arithmetic testsRobert Peichaer
ok @ajacoutot
2012-11-10consistently use [ -n "${var}" ] instead of [ "${var}" ]Robert Peichaer
no functional change discussed and ok ajacoutot
2012-11-10turn single-command if-then-fi blocks into "[ expr ] && command"Robert Peichaer
style lines. no change of functionality. discussed with and ok ajacoutot
2012-11-10enhance error_rm_wrkdir() to print an error message if one is passedRobert Peichaer
as argument to replace some error "message" error_rm_workdir lines by a single error_rm_workdir "message" line. ok ajacoutot
2012-11-08mark some more variables as localRobert Peichaer
ok ajacoutot
2012-08-28Always compare master.passwd(5) and group(5) regardless of their sums:Antoine Jacoutot
this is a sanity check to ensure no system user(s)/group(s) are missing. ok sthen@
2012-08-20Explicitely set local variables as such.Antoine Jacoutot
Remove unused DBFILE. from robert at peichaer dot org
2012-08-20Don't unset NEED_NEWALIASES too soon or we will not get the warning.Antoine Jacoutot
from robert at peichaer dot org
2012-08-15use Lk for links;Jason McIntyre
2012-08-04Also log the file(s) we manually merged/installed as it's importantAntoine Jacoutot
information. ok sthen@
2012-08-04Factorize common warn, error and report outputs into functions.Antoine Jacoutot
Remove bogus echo -n "foobar\n", leftover from display output tests. No functional change but makes the code more readable. from robert ar peichaer dor org ok sthen@
2012-03-19Use $() instead of backticks.Antoine Jacoutot
2012-02-17Remove the backup chunk from the man page. People should use backupAntoine Jacoutot
anyway and sysmerge(8) automatically save replaced files. ok sthen@
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-21Adjust work directory name.Antoine Jacoutot
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-11Missed that part in previous.Antoine Jacoutot
from jmc@
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.