Commit Graph

84 Commits

Author SHA1 Message Date
lukem b9fbb3f21a manage tpctl with do_rc(). Fix from Jukka Salmi in PR 26754 2004-10-12 13:29:05 +00:00
lukem 08c7699414 * Implement modify_file() to apply an awk program against a file and display
the diffs and possibly install the new version of file.
  (Based on sshd_config munging code in do_ssh())
* Use modify_file() in do_hosts() and do_ssh().
* Be more specific in do_x11() about what needs to occur.
  (This could still be improved).
* Minor sh cleanups.  ("sh is not C")
2004-08-30 04:57:39 +00:00
augustss 4d1e9e453b The hosts file is /etc/hosts not /hosts. 2004-08-30 02:46:07 +00:00
chs 85b920f8a2 add a dotted alias for localhost so that sendmail doesn't pause on startup
if a system's hostname is not set.  PR 26550.
2004-08-29 13:26:17 +00:00
lukem 5d87974ec4 Search /usr/lib/i18n and /usr/X11R6/lib for obsolete minor shared libraries. 2004-08-12 13:32:37 +00:00
lukem a5e99ebea6 * Implement obsolete_paths() to obsolete the paths provided on stdin.
(based on the guts of do_obsolete().
* Implement obsolete_libs() to print a list of obsolete minor/teeny
  shared libraries in the provided directory.
  The implementation supports removing old major libraries similar to
  src/lib/checkoldvers (except this correctly matches more stuff), but
  there's no way to enable that at this time.
* do_rc(): convert to obsolete_paths() to remove old rc.d scripts.
* do_obsolete(): convert to obsolete_paths().  add obsolete_libs() for
  /lib and /usr/lib to remove old minor/teeny shared libraries.
* Clean up the usage.
2004-08-12 02:30:23 +00:00
thorpej fa4f012f1e Add a: to the getopt string so that the -a option is actually recognized. 2004-07-25 01:37:14 +00:00
tron 3112a70615 Check for "pf" and "pflogd". 2004-06-30 11:25:22 +00:00
lukem f45be9fc4a Add x11 test to ask user to migrate from /usr/X11R6/lib/X11/<foo> to
/etc/X11/<foo>, where <foo> is one of:
	fs lbxproxy proxymngr rstart twm xdm xinit xserver xsm

(I haven't implemented automatic migration at this time; it's too fragile
given that /etc/X11 may already exist on some systems)
2004-05-16 11:19:28 +00:00
dbj 4fe7bbb7da enable rc.d fixsb script
initial testing suggests that it is working and I am confident it
will not cause irrevocable damage
2004-04-18 04:02:27 +00:00
lukem c16dc445c3 style consistency cleanup
support "diff -p"
use "err 1" instead of "diff_usage"
2004-03-16 23:15:40 +00:00
enami 4e3d261647 Add new operation `diff', which is similar to `check' but also runs diff
command on files need to copy while compare_dir.
2004-03-16 23:03:14 +00:00
lukem 0541807809 The ssh_known_hosts check for "NetBSD RCSID matches" does not belong in
postinstall, so remove it;  sshd functions fine without the entries.
This type of functionality is performed as part of etcupdate(8) (et al).
2004-02-03 08:02:41 +00:00
christos 0120b80220 add identd 2004-02-01 02:32:58 +00:00
jmmv ec3213dda0 Add the veriexec rc.d script. 2004-01-14 10:51:54 +00:00
itojun 1644d4f2cf align ssh_known_hosts message with other operations 2004-01-14 04:49:57 +00:00
tls d8793381d3 Install default ssh_known_hosts file with public keys for Project servers.
Hopefully I didn't make too much of a hash of the postinstall support for
this; it currently installs the file if there's none in the destination,
and elsewise notes if the CVS version differs (or is missing) but doesn't
try to fix that.
2004-01-11 04:21:18 +00:00
lukem 165989f36c Add etc_release to check if etc/release is up to date.
Only used for "extracted etc.tgz SRC_DIR", as "src/etc SRC_DIR" builds
etc/release automatically.

Improve the usage and some of the code.
2004-01-06 13:16:53 +00:00
martin 04d651d978 Add rtclocaltime (couldn't we mark these in the set lists somehow
instead of duplicating part of the list here?)
2003-12-27 23:00:55 +00:00
lukem d90e033b23 improve build of MAKEDEV from src 2003-12-22 21:38:23 +00:00
tron 80b84ce51e Set "NETBSDSRCDIR" in environment while generating "MAKEDEV" script to
make the check work if "postinstall" is not invoked from "build.sh".
2003-12-22 12:07:59 +00:00
lukem 3d29fcd1f7 Fix previous:
*	Restore previous functionality which supported running postinstall
	with an extracted etc.tgz set as the "source" directory (i.e,
	/usr/src isn't available).  We do this by generating the MAKEDEV
	to ${SCRATCHDIR} if the real source is available, and leverage off
	the compare_dir() code that the rest of postinstall uses to support
	this functionality.

    *	Don't special case MACHINE_ARCH==arm; the MAKEDEV.awk should
	be doing that since etc/Makefile doesn't have similar special
	case code.  In any case, AFAICT the only MACHINE_ARCHs are
	"arm" and "armeb"; there is no "armel" in NetBSD.
2003-10-26 23:08:29 +00:00
jdolecek ef31c1b29a update for unified, dynamically generated MAKEDEV - change 'makedev' item
to generate the MAKEDEV to scratch dir and compare that with the currently
installed /dev/MAKEDEV; also add -a MACHINE_ARCH option to explicitly
set machine architecture for non-native builds

problem with postinstall pointed out by Patrick Welche and Hubert Feyrer
in private e-mails
2003-10-26 21:57:11 +00:00
lukem 6409af4cfe use find_file_in_dirlist() (instead of private version) when searching
for the ssh moduli file
2003-05-15 05:25:24 +00:00
lukem 35bfe45330 Ensure that the exit status in do_obsolete() is correctly determined.
Problem introduced in previous, and noticed by Rob Quinn in private email.
2003-05-13 02:41:27 +00:00
lukem db48ae2bcb reverse sort all of the obsolete lists before attempting to removing,
incase an obsolete directory appeared in a setfile whose filename
alphasorted before another setfile with obsolete "children" of that directory.
fixes [install/21348] from Rob Quinn.
2003-05-10 10:20:31 +00:00
thorpej 324cf4c7d6 Add /etc/rc.d/powerd. 2003-04-18 05:38:40 +00:00
atatat 8deab10532 Add more style points to a few places in the do_sendmail section, and
teach it how to install sample config files so that people aren't as
lost.
2003-04-02 17:56:46 +00:00
atatat 9dc7b7c964 Tweak postinstall to check for (and help out on) the upgrade to
sendmail 8.12.8.  Some of the same machinery (in shorter form) is in
the additions to rc.d/sendmail.  Also, add a smmsp startup script for
the sendmail client queue runner.
2003-03-24 15:19:27 +00:00
lukem 325e31e279 rcconf_is_set(): add optional 4th arg to control whether "obsolete"
warnings are printed.  this means it can now be used for "non obsolete"
rc.conf checks as well...
2003-03-11 04:49:18 +00:00
lukem 6bce155b9e now that the obsolete lists are part of the "base" set (instead of "etc"),
only look for them in ${DEST_DIR}/var/db/obsolete
2003-02-22 23:46:46 +00:00
lukem 4f6381b784 all:
Use /var/db/obsolete instead of /etc/obsolete

etc/Makefile:
	Create separate target "install-obsolete-files" to populate
	/var/db/obsolete, instead of using "install-etc-files".

Makefile:
	Add do-obsolete target, to run "cd etc && make install-obsolete-files",
	and add this to BUILDTARGETS.
	This moves the "obsolete files" creation from "distribution" to "build".


Per discussion with Andrew Brown.
2003-02-22 03:20:45 +00:00
lukem 4777a3b44a rm -f target file before cp -f. 2003-02-20 12:47:29 +00:00
lukem 5c198ab018 etc/postinstall
*	Improve message display in find_file_in_dirlist()
    *	do_obsolete(): instead of running distrib/sets/makeobsolete to
	temporarily generate the obsolete sets lists, look for them in
	${SRC_DIR}/etc/obsolete/* or ${DEST_DIR}/etc/obsolete/*.
	The obsolete check now works for "extracted etc.tgz" as the source dir.

etc/Makefile (install-etc-files), distrib/sets/lists/*
    *	Install obsolete set lists into /etc/obsolete/
    *	Tweak how pwd_mkdb files are added to METALOG

distrib/sets/makeobsolete
    *	Don't bother with "_obsolete" suffix on generated file names.
2003-02-20 11:40:28 +00:00
lukem 31e59fe101 - add [-m machine] support, from David Laight dsl@
- parenthesise some messages
- add some bugs and todo items
2003-02-18 10:12:52 +00:00
abs cb588f7bde Among the many things postinstall should check are up to date is... postinstall 2003-01-21 14:28:55 +00:00
minoura 59cc4d6235 Add rc.d/staticroute check. 2003-01-16 15:26:14 +00:00
martti 405c73366e Back out previous (as discussed with releng). The correct way to set this is:
# echo "myserver" > /var/yp/binding/`domainname`.ypservers
2003-01-16 11:55:28 +00:00
martti 1e0411d0d5 Script to bind a NIS client to a known server.
$ grep yp /etc/rc.conf
ypbind=YES
ypbind_flags="-ypset"
ypset=YES
ypset_flags="myserver"
2003-01-16 07:37:33 +00:00
wiz 1035faff1d writable, not writeable. 2003-01-06 20:30:28 +00:00
tron 08eb23c3fe Do last change differently so that the script doesn't print out "//" if
"DESTDIR" is set to "/" as suggested by Luke Mewburn in private e-mail.
2002-12-30 13:16:43 +00:00
tron f0df353967 Fix postinstall message for builds with "${DESTDIR}" set to "/". 2002-12-30 12:24:45 +00:00
lukem 8ab934ee29 If "check" and some items failed, output the postinstall command-line
required to fix the issues.
2002-12-27 00:04:49 +00:00
lukem f1de01bbc3 - makedev: look for MAKEDEV in ${SRC_DIR}/etc/etc.${MACHINE} & ${SRC_DIR}/dev,
so that postinstall on an extracted etc.tgz set works for this check
- implement find_file_in_dirlist(), and use in do_makedev() and do_postfix()
2002-12-17 12:47:48 +00:00
lukem aa17e07211 SYS_INCLUDE=symlinks has been deprecated; reenable obsolete check 2002-11-26 23:37:09 +00:00
thorpej a46e31a46c Disable "obsolete" for now, since it has major problems with
SYS_INCLUDES=symlinks.
2002-11-22 15:51:42 +00:00
itojun 81a0af7afd ${setdir} is not needed as we chdir to ${setdir}. 2002-11-17 04:14:00 +00:00
lukem 3b1e0611c6 Add support for using the obsolete sets to check for and remove obsolete files. 2002-11-17 03:22:47 +00:00
lukem 1be07ae391 In ssh check, ensure that ${DESTDIR}/etc/moduli is up to date.
Supports either ${SRCDIR}/crypto/dist/ssh (if using -s on a src tree)
or ${SRCDIR}/etc (if using -s on an extracted etc.tgz set) for the
"source" location of moduli.
2002-11-17 01:04:46 +00:00
lukem 4befe83846 todo item: check etc/moduli (if possible) 2002-11-17 00:49:54 +00:00