Commit Graph

53 Commits

Author SHA1 Message Date
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
enami
cb97efbe27 Add more files to obsolete rc.d files (actually, files found in rc.d/Attic). 2002-11-07 06:12:50 +00:00
elric
98839fb386 Added cgd rc.d script and put it in the appropriate postinstall and
mtree files.
2002-10-09 14:55:53 +00:00
christos
322bb64a6e Discourage use of $*, prefering "$@", since it is white-space preserving. 2002-09-20 12:57:33 +00:00
lukem
c788921e6a In compare_dir(), when files don't match print:
src != dest
instead of:
	dest != src
I think that's less confusing and more consistent.

In do_postfix(), if ${SRC_DIR}/gnu/dist/postfix/conf doesn't exist and
${DEST_DIR}/usr/share/examples/postfix does, use the latter for the
${DEST_DIR}/etc/postfix checks.  This means that postinstall can be
run in a temporary directory which has etc.tgz extracted into it
with -s `pwd`, (versus against a source tree), and the postfix upgrade
works correctly.

Remove some unnecessary goop.
2002-09-06 08:58:48 +00:00
lukem
e8487071c4 some consistency, please... 2002-09-06 06:41:32 +00:00
lukem
5c6c83e074 - remember failure condition after first compare_dir in do_postfix()
- add another todo item which i'll work on later
2002-09-04 13:05:27 +00:00
itojun
69bb32570a postfix check (may need to do more). part of PR 18155 2002-09-04 08:00:01 +00:00
abs
df86ef5a9f Split raidframe parity checking/rebuild out into raidframeparity, which is
called after quota so we don't end up with fsck and raidframe parity rebuild
taking forever after a crash/reboot.
While we are here check for raid[0-9].conf & raid[1-9][0-9].conf not
			    raid[0-9].conf & raid[0-9][0-9].conf
2002-09-03 15:35:51 +00:00
lukem
f91d5a2f45 add wdogctl 2002-07-30 09:11:27 +00:00
yamt
1030138025 add mixerctl and wsmoused. 2002-07-03 23:28:24 +00:00
lukem
9073fc120d - Certain operations currently don't actually "fix" things, so
highlight this in the error message (as "[NOT FIXED]").
  idea from discussion with itojun
- Do NOT run  "cd /dev ; sh ./MAKEDEV all"  with "fix makedev".
  Just check/fix that /dev/MAKEDEV is up to date.
  I don't think that the former behaviour was appropriate, especially as
  part of a common "fix all" scenario.
2002-07-03 06:19:41 +00:00
lukem
7a3ba9ecb7 revert previous; the user is supposed to be able to change /etc/wscons.conf
from the default shipped one, and the rest of the test in do_wscons()
is to detect obsolete wscons.conf(5) directives on systems with a
wscons.conf from an older release / source tree.
2002-06-29 22:25:23 +00:00
itojun
cd584a155b make 'fix wscons" work. 2002-06-29 19:47:02 +00:00
lukem
827e6e33a7 - do_makedev(): if the compare_dir() fails, return immediately
- if SRC_DIR or DEST_DIR == /, set to "" so that various pathnames
  don't end up with a leading "//".  when specifically printing just
  the xxx_DIR variable, use ${xxx_DIR:-/} to DTRT
- cosmetic coding tweaks
2002-06-28 09:35:23 +00:00
itojun
8e021f72ae add "makedev" target. 2002-06-27 02:26:39 +00:00
thorpej
cd1a49324a Add the smmsp uid and gid. 2002-06-18 22:58:30 +00:00
lukem
a7727a5eaa Don't run the compare_dir() checks if the src dir doesn't exist.
Suggested by atatat@ in private email.
2002-06-11 03:15:41 +00:00
lukem
1d999ae30d Fix cosmetic issue in check_ids() when printing out multiple missings IDs.
Resolves [toolchain/17024] from Tracy Di Marco White.
2002-05-26 04:38:13 +00:00
lukem
0ede5cc7ca - add check_dir(), which checks or creates the given directory, and
use appropriately (rather than replicating effort)
- add check_ids(), to check if the lists ids exist in the first field
  of a : separated file.
- implement do_gid() and do_uid() using check_ids()
- check for ${DEST_DIR}/var/chroot/ssh instead of /var/chroot/ssh

- rename rcconf_isset() to rcconf_is_set()
- rename cmpdir() to compare_dir()
- be consistent about referring to variables with ${...}
2002-05-17 05:40:42 +00:00
itojun
e26b1052bb use /var/chroot/sshd instead of /var/empty. suggested by christos 2002-05-16 20:59:35 +00:00
itojun
2d4044e40b check sshd uid/gid, as well as /var/empty 2002-05-14 23:35:35 +00:00
thorpej
3a8cbe5d2b Fix the do_uid() and do_gid() functions so they actually work
(a junk var is needed to slurp up the rest of the line that we
don't want).
2002-05-14 22:41:36 +00:00
itojun
c8ade0d0d1 check required UID/GID (named and ntpd at this moment) 2002-05-14 05:31:11 +00:00
itojun
242ce0ff66 typo in usage 2002-05-14 05:26:13 +00:00
lukem
42f8815d89 Change -s srcdir and -d destdir so that they don't contain the "/etc" portion.
srcdir now defaults to /usr/src (from /usr/src/etc).
destdir now defaults to / (from /etc).
2002-05-07 02:11:07 +00:00
lukem
f0e51dbf17 Check for obsolete "mux 1" wscons.conf(5) entries.
Suggested by George Coulouris <george@coulouris.org>.
2002-05-06 03:02:59 +00:00
lukem
5d082ef225 - cmpdir(); use "cp -f" (instead of "cp") to copy files
- do-rc(); check for obsoleted rc.conf(5) variables
2002-04-29 12:05:45 +00:00
lukem
c83924b939 ssh: try renaming /etc/ssh/ssh{,d}.conf -> /etc/ssh/ssh{,d}_config before
/etc/ssh{,d}.conf -> /etc/ssh/ssh{,d}_config.
2002-04-29 08:31:01 +00:00
lukem
244b762de1 Complete the conversion back to the OpenSSH default configuration files of
"/etc/ssh/ssh_config" (from "/etc/ssh/ssh.conf") for ssh(1) and other
userland tools, and "/etc/ssh/sshd_config (from "/etc/ssh/sshd.conf")
for sshd(8).

etc/postinstall will detect this, and if "fix" is given, rename the files.
2002-04-29 08:23:34 +00:00
lukem
a65f716c1b - ssh: check for obsolete sshd_conf_dir
- add extra arg to cmpdir() (before files list), which is the target
  mode of copied files
- implement rcconf_isset(), which checks if an rc.conf(5) variable is set
  and warns if so.
- minor tweaks
2002-04-29 06:05:24 +00:00
bjh21
8dd390a3ac This script is run on the host for cross builds, so it can't use mktemp -d.
Use a tidied-up version of my shell fragment from maketars instead.
2002-04-28 22:17:43 +00:00