summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysmerge (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* simplify chroot casesrpe2013-01-041-18/+4
| | | | ok ajacoutot@
* Refactor code for extracting and checksumming of (x)etcXX.tgz setsrpe2013-01-031-37/+46
| | | | | | | | | 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@
* correction of the SRCDIR checkrpe2012-12-261-2/+2
|
* Combine almost identical code for fetching and checking of therpe2012-12-261-27/+19
| | | | | | | 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@
* replace one grep with awk patterns and simplify another using -qrpe2012-12-251-3/+3
| | | | ok ajacoutot@
* simplify things by using shell patternsrpe2012-12-241-13/+10
| | | | ok ajacoutot@ halex@
* simplify setting FETCH_CMD and move it upwards to where the otherrpe2012-12-231-6/+2
| | | | | | global variables are defined ok ajacoutot@
* use (()) for arithmetic testsrpe2012-12-191-5/+5
| | | | ok @ajacoutot
* consistently use [ -n "${var}" ] instead of [ "${var}" ]rpe2012-11-101-24/+24
| | | | | | no functional change discussed and ok ajacoutot
* turn single-command if-then-fi blocks into "[ expr ] && command"rpe2012-11-101-54/+25
| | | | | | style lines. no change of functionality. discussed with and ok ajacoutot
* enhance error_rm_wrkdir() to print an error message if one is passedrpe2012-11-101-17/+13
| | | | | | | | | | | as argument to replace some error "message" error_rm_workdir lines by a single error_rm_workdir "message" line. ok ajacoutot
* mark some more variables as localrpe2012-11-081-5/+5
| | | | ok ajacoutot
* Always compare master.passwd(5) and group(5) regardless of their sums:ajacoutot2012-08-282-5/+11
| | | | | | this is a sanity check to ensure no system user(s)/group(s) are missing. ok sthen@
* Explicitely set local variables as such.ajacoutot2012-08-201-10/+14
| | | | | | Remove unused DBFILE. from robert at peichaer dot org
* Don't unset NEED_NEWALIASES too soon or we will not get the warning.ajacoutot2012-08-201-2/+1
| | | | from robert at peichaer dot org
* use Lk for links;jmc2012-08-151-4/+4
|
* Also log the file(s) we manually merged/installed as it's importantajacoutot2012-08-041-4/+12
| | | | | | information. ok sthen@
* Factorize common warn, error and report outputs into functions.ajacoutot2012-08-041-30/+42
| | | | | | | | | 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@
* Use $() instead of backticks.ajacoutot2012-03-191-28/+28
|
* Remove the backup chunk from the man page. People should use backupajacoutot2012-02-171-8/+2
| | | | | | anyway and sysmerge(8) automatically save replaced files. ok sthen@
* add a missing newline when you merge login.conf if login.conf.db doesn't existsthen2011-10-091-1/+3
| | | | ok aja@
* Fix the display of running utilities (e.g. don't say we are runningajacoutot2011-09-011-11/+13
| | | | | makemap when we are in fact running newaliases...). No functionnal change.
* Remove the 'obsolete file(s)' feature. It may come back at some pointajacoutot2011-08-031-23/+4
| | | | | | | (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@
* Adjust work directory name.ajacoutot2011-07-211-5/+5
|
* EDITOR or VISUAL are not a path. They are a string that needs to bederaadt2011-07-111-6/+2
| | | | | added to the front of the file, then sent through system() of equiv. ok aja
* use more XXX for mktemp; ok ajacoutotderaadt2011-07-111-2/+2
|
* Harden the checks on the provided sets/src to make sure they are legit.ajacoutot2011-07-061-13/+20
| | | | ok sthen@
* Consistency in stdout redirections.ajacoutot2011-07-061-20/+19
|
* Indent, no change.ajacoutot2011-07-061-2/+3
|
* Make it possible to pass https:// and file:// (along with ftp:// andajacoutot2011-07-051-3/+3
| | | | | | | http://) so that sysmerge(8) can work with URLs we use in the install script. ok sthen@
* Installing -> Updating.ajacoutot2011-05-091-4/+4
| | | | Update copyright year while here.
* Make sure /etc/group and /etc/master.passwd are handled first in case weajacoutot2011-05-081-3/+6
| | | | | | | need to install files or directories with newly added user/group ownerships. ok sthen@ (on a slightly different diff)
* If it doesn't exist, create the directory holding the link we are aboutajacoutot2011-05-061-1/+6
| | | | | | | | 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@
* Cosmetic:ajacoutot2011-04-271-9/+9
| | | | | | | | | * "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@
* Oopsy.ajacoutot2011-04-211-2/+2
|
* Better detection of obsolete files (naddy@ reported a false positive).ajacoutot2011-04-211-4/+5
| | | | help from and ok naddy@
* Enhance sysmerge(8) output so that it is more readable and make it moreajacoutot2011-04-201-48/+48
| | | | | | | | | | | | | | | | | | | | | | 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@
* Fix a bug where OBSOLETE_FILES would contain only the last appendedajacoutot2011-04-181-4/+5
| | | | | | occurence. with a small tweak from an ok sthen@
* Missed that part in previous.ajacoutot2010-11-111-2/+2
| | | | from jmc@
* Unconfuse usage.ajacoutot2010-11-112-5/+5
| | | | prodded by and ok espie@, ok jmc@
* No need to differentiate newly installed files versus automaticallyajacoutot2010-11-081-2/+2
| | | | | | updated files in the output, this is confusing. ok sthen@
* Make sure we don't end up using /usr/src/etc if we forget to pass theajacoutot2010-11-041-1/+7
| | | | | | | | 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@
* Display usage information as well as the error when a path tosthen2010-08-211-1/+2
| | | | src/*.tgz isn't specified. ok ajacoutot@
* Instead of checking for the *etcXX.tgz filename, check whether theajacoutot2010-07-201-7/+5
| | | | | | | | 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@
* When running in full diff mode, don't wait for user input beforeajacoutot2010-07-171-57/+13
| | | | | | 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.
* Add a blank line between sections in the output log, it's more readable.ajacoutot2010-07-061-1/+2
|
* Automatically install missing users and groups.ajacoutot2010-07-052-5/+74
| | | | | | | | (does *NOT* touch existing users/groups) "I like it" from several... inputs from sthen@ and halex@ ok krw@ halex@ sthen@
* Suggest a reboot if "sh MAKEDEV" was run or login.conf was modified.ajacoutot2010-06-271-3/+11
| | | | | reported by matthieu@ req. by and "I like it" deraadt@
* s/sh/ksh/ajacoutot2010-03-201-3/+3
|
* Remove newly generated sum file(s) if it did not exist before and trapajacoutot2010-02-061-8/+10
| | | | | | | | is called. While here, change shebang to /bin/ksh to reflect reality and bump copyright year. "checkbashisms says yes. :-)" && ok sthen@