mergemaster.sh revision 60420
1#!/bin/sh 2 3# mergemaster 4 5# Compare files created by /usr/src/etc/Makefile (or the directory 6# the user specifies) with the currently installed copies. 7 8# Copyright 1998, 1999 Douglas Barton 9# Doug@gorean.org 10 11# $FreeBSD: head/usr.sbin/mergemaster/mergemaster.sh 60420 2000-05-12 03:09:57Z bsd $ 12 13PATH=/bin:/usr/bin:/usr/sbin 14 15display_usage () { 16 VERSION_NUMBER=`grep "[$]FreeBSD:" $0 | cut -d ' ' -f 4` 17 echo "mergemaster version ${VERSION_NUMBER}" 18 echo "Usage: mergemaster [-scrvah] [-m /path] [-t /path] [-d] [-u N] [-w N]" 19 echo "Options:" 20 echo " -s Strict comparison (diff every pair of files)" 21 echo " -c Use context diff instead of unified diff" 22 echo " -r Re-run on a previously cleaned directory (skip temproot creation)" 23 echo " -v Be more verbose about the process, include additional checks" 24 echo " -a Leave all files that differ to merge by hand" 25 echo " -h Display more complete help" 26 echo " -m /path/directory Specify location of source to do the make in" 27 echo " -t /path/directory Specify temp root directory" 28 echo " -d Add date and time to directory name (e.g., /var/tmp/temproot.`date +%m%d.%H.%M`)" 29 echo " -u N Specify a numeric umask" 30 echo " -w N Specify a screen width in columns to sdiff" 31 echo '' 32} 33 34display_help () { 35 echo "* To create a temporary root environment, compare CVS revision \$Ids" 36 echo " for files that have them, and compare diffs for files that do not," 37 echo " or have different ones, just type, mergemaster" 38 echo "* To specify a directory other than /var/tmp/temproot for the" 39 echo " temporary root environment, use -t /path/to/temp/root" 40 echo "* The -w option takes a number as an argument for the column width" 41 echo " of the screen. The default is 80." 42 echo "* The -a option causes mergemaster to run without prompting" 43} 44 45 46# Loop allowing the user to use sdiff to merge files and display the merged 47# file. 48merge_loop () { 49 case "${VERBOSE}" in 50 '') ;; 51 *) 52 echo " *** Type h at the sdiff prompt (%) to get usage help" 53 ;; 54 esac 55 echo '' 56 MERGE_AGAIN=yes 57 while [ "${MERGE_AGAIN}" = "yes" ]; do 58 # Prime file.merged so we don't blat the owner/group id's 59 cp -p "${COMPFILE}" "${COMPFILE}.merged" 60 sdiff -o "${COMPFILE}.merged" --text --suppress-common-lines \ 61 --width=${SCREEN_WIDTH:-80} "${COMPFILE#.}" "${COMPFILE}" 62 INSTALL_MERGED=V 63 while [ "${INSTALL_MERGED}" = "v" -o "${INSTALL_MERGED}" = "V" ]; do 64 echo '' 65 echo " Use 'i' to install merged file" 66 echo " Use 'r' to re-do the merge" 67 echo " Use 'v' to view the merged file" 68 echo " Default is to leave the temporary file to deal with by hand" 69 echo '' 70 read -p " *** How should I deal with the merged file? [Leave it for later] " INSTALL_MERGED 71 72 case "${INSTALL_MERGED}" in 73 [iI]) 74 mv "${COMPFILE}.merged" "${COMPFILE}" 75 echo '' 76 if mm_install "${COMPFILE}"; then 77 echo " *** Merged version of ${COMPFILE} installed successfully" 78 else 79 echo " *** Problem installing ${COMPFILE}, it will remain to merge by hand later" 80 fi 81 unset MERGE_AGAIN 82 ;; 83 [rR]) 84 rm "${COMPFILE}.merged" 85 ;; 86 [vV]) 87 ${PAGER} "${COMPFILE}.merged" 88 ;; 89 '') 90 echo " *** ${COMPFILE} will remain for your consideration" 91 unset MERGE_AGAIN 92 ;; 93 *) 94 echo "invalid choice: ${INSTALL_MERGED}" 95 INSTALL_MERGED=V 96 ;; 97 esac 98 done 99 done 100} 101 102# Loop showing user differences between files, allow merge, skip or install 103# options 104diff_loop () { 105 106 HANDLE_COMPFILE=v 107 108 while [ "${HANDLE_COMPFILE}" = "v" -o "${HANDLE_COMPFILE}" = "V" -o "${HANDLE_COMPFILE}" = "NOT V" ]; do 109 if [ -f "${COMPFILE#.}" -a -f "${COMPFILE}" ]; then 110 if [ "${HANDLE_COMPFILE}" = "v" -o "${HANDLE_COMPFILE}" = "V" ]; then 111 ( 112 echo " *** Displaying differences between ${COMPFILE} and installed version:" 113 echo '' 114 diff "${DIFF_FLAG}" "${COMPFILE#.}" "${COMPFILE}" 115 ) | ${PAGER} 116 echo '' 117 fi 118 else 119 echo " *** There is no installed version of ${COMPFILE}" 120 NO_INSTALLED=yes 121 fi 122 123 echo " Use 'd' to delete the temporary ${COMPFILE}" 124 echo " Use 'i' to install the temporary ${COMPFILE}" 125 case "${NO_INSTALLED}" in 126 '') 127 echo " Use 'm' to merge the old and new versions" 128 echo " Use 'v' to view to differences between the old and new versions again" 129 ;; 130 esac 131 echo '' 132 echo " Default is to leave the temporary file to deal with by hand" 133 echo '' 134 read -p "How should I deal with this? [Leave it for later] " HANDLE_COMPFILE 135 case "${HANDLE_COMPFILE}" in 136 [dD]) 137 rm "${COMPFILE}" 138 echo '' 139 echo " *** Deleting ${COMPFILE}" 140 ;; 141 [iI]) 142 echo '' 143 if mm_install "${COMPFILE}"; then 144 echo " *** ${COMPFILE} installed successfully" 145 else 146 echo " *** Problem installing ${COMPFILE}, it will remain to merge by hand" 147 fi 148 ;; 149 [mM]) 150 case "${NO_INSTALLED}" in 151 '') 152 # interact with user to merge files 153 merge_loop 154 ;; 155 *) 156 echo '' 157 echo " *** There is no installed version of ${COMPFILE}" 158 echo '' 159 HANDLE_COMPFILE="NOT V" 160 ;; 161 esac # End of "No installed version of file but user selected merge" test 162 ;; 163 [vV]) 164 continue 165 ;; 166 '') 167 echo '' 168 echo " *** ${COMPFILE} will remain for your consideration" 169 ;; 170 *) 171 # invalid choice, show menu again. 172 echo "invalid choice: ${HANDLE_COMPFILE}" 173 echo '' 174 HANDLE_COMPFILE="NOT V" 175 continue 176 ;; 177 esac # End of "How to handle files that are different" 178 done 179 echo '' 180 unset NO_INSTALLED 181 echo '' 182 case "${VERBOSE}" in 183 '') ;; 184 *) 185 sleep 3 186 ;; 187 esac 188} 189 190# Set the default path for the temporary root environment 191# 192TEMPROOT='/var/tmp/temproot' 193 194# Read .mergemasterrc before command line so CLI can override 195# 196if [ -f "$HOME/.mergemasterrc" ]; then 197 . "$HOME/.mergemasterrc" 198fi 199 200# Check the command line options 201# 202while getopts ":ascrvhm:t:du:w:" COMMAND_LINE_ARGUMENT ; do 203 case "${COMMAND_LINE_ARGUMENT}" in 204 s) 205 STRICT=yes 206 ;; 207 c) 208 DIFF_FLAG='-c' 209 ;; 210 r) 211 RERUN=yes 212 ;; 213 v) 214 case "${AUTO_RUN}" in 215 '') VERBOSE=yes ;; 216 esac 217 ;; 218 a) 219 AUTO_RUN=yes 220 unset VERBOSE 221 ;; 222 h) 223 display_usage 224 display_help 225 exit 0 226 ;; 227 m) 228 SOURCEDIR=${OPTARG} 229 ;; 230 t) 231 TEMPROOT=${OPTARG} 232 ;; 233 d) 234 TEMPROOT=${TEMPROOT}.`date +%m%d.%H.%M` 235 ;; 236 u) 237 NEW_UMASK=${OPTARG} 238 ;; 239 w) 240 SCREEN_WIDTH=${OPTARG} 241 ;; 242 *) 243 display_usage 244 exit 1 245 ;; 246 esac 247done 248 249echo '' 250 251# If the user has a pager defined, make sure we can run it 252# 253case "${DONT_CHECK_PAGER}" in 254'') 255 while [ "${PAGER}" != "more" -a -n "${PAGER}" -a ! -x "${PAGER%% *}" ]; do 256 echo " *** Your PAGER environment variable specifies '${PAGER}', but" 257 echo " I cannot execute it. In general it is good practice to" 258 echo " specify the full path for environment variables like" 259 echo " PAGER and EDITOR. Meanwhile, what would you like to do?" 260 echo '' 261 echo " Use 'e' to exit mergemaster and fix your PAGER variable" 262 if [ -x /usr/local/bin/less ]; then 263 echo " Use 'l' to set PAGER to /usr/local/bin/less for this run" 264 fi 265 echo " Use 'm' to use plain old 'more' as your PAGER for this run" 266 echo '' 267 echo " Default is to use plain old 'more' " 268 echo '' 269 read -p "What should I do? [Use 'more'] " FIXPAGER 270 case "${FIXPAGER}" in 271 [eE]) 272 exit 0 273 ;; 274 [lL]) 275 if [ -x /usr/local/bin/less ]; then 276 PAGER=/usr/local/bin/less 277 fi 278 ;; 279 [mM]|'') 280 PAGER=more 281 ;; 282 *) 283 echo '' 284 echo "invalid choice: ${FIXPAGER}" 285 esac 286 echo '' 287 done 288 ;; 289esac 290 291# If user has a pager defined, or got assigned one above, use it. 292# If not, use more. 293# 294PAGER=${PAGER:-more} 295 296if [ -n "${VERBOSE}" -a ! "${PAGER}" = "more" ]; then 297 echo " *** You have ${PAGER} defined as your pager so we will use that" 298 echo '' 299 sleep 3 300fi 301 302# Assign the diff flag once so we will not have to keep testing it 303# 304DIFF_FLAG=${DIFF_FLAG:--u} 305 306# Assign the source directory 307# 308SOURCEDIR=${SOURCEDIR:-/usr/src/etc} 309 310case "${RERUN}" in 311'') 312 # Set up the loop to test for the existence of the 313 # temp root directory. 314 # 315 TEST_TEMP_ROOT=yes 316 while [ "${TEST_TEMP_ROOT}" = "yes" ]; do 317 if [ -d "${TEMPROOT}" ]; then 318 echo "*** The directory specified for the temporary root environment," 319 echo " ${TEMPROOT}, exists. This can be a security risk if untrusted" 320 echo " users have access to the system." 321 echo '' 322 case "${AUTO_RUN}" in 323 '') 324 echo " Use 'd' to delete the old ${TEMPROOT} and continue" 325 echo " Use 't' to select a new temporary root directory" 326 echo " Use 'e' to exit mergemaster" 327 echo '' 328 echo " Default is to use ${TEMPROOT} as is" 329 echo '' 330 read -p "How should I deal with this? [Use the existing ${TEMPROOT}] " DELORNOT 331 case "${DELORNOT}" in 332 [dD]) 333 echo '' 334 echo " *** Deleting the old ${TEMPROOT}" 335 echo '' 336 rm -rf "${TEMPROOT}" 337 unset TEST_TEMP_ROOT 338 ;; 339 [tT]) 340 echo " *** Enter new directory name for temporary root environment" 341 read TEMPROOT 342 ;; 343 [eE]) 344 exit 0 345 ;; 346 '') 347 echo '' 348 echo " *** Leaving ${TEMPROOT} intact" 349 echo '' 350 unset TEST_TEMP_ROOT 351 ;; 352 *) 353 echo '' 354 echo "invalid choice: ${DELORNOT}" 355 echo '' 356 ;; 357 esac 358 ;; 359 *) 360 # If this is an auto-run, try a hopefully safe alternative then re-test anyway 361 TEMPROOT=/var/tmp/temproot.`date +%m%d.%H.%M.%S` 362 ;; 363 esac 364 else 365 unset TEST_TEMP_ROOT 366 fi 367 done 368 369 echo "*** Creating the temporary root environment in ${TEMPROOT}" 370 371 if mkdir -p "${TEMPROOT}"; then 372 echo " *** ${TEMPROOT} ready for use" 373 fi 374 375 if [ ! -d "${TEMPROOT}" ]; then 376 echo '' 377 echo " *** FATAL ERROR: Cannot create ${TEMPROOT}" 378 echo '' 379 exit 1 380 fi 381 382 echo " *** Creating and populating directory structure in ${TEMPROOT}" 383 echo '' 384 385 case "${VERBOSE}" in 386 '') ;; 387 *) 388 echo " *** Press [Enter] or [Return] key to continue" 389 read ANY_KEY 390 unset ANY_KEY 391 ;; 392 esac 393 394 { cd ${SOURCEDIR} && 395 make DESTDIR=${TEMPROOT} distrib-dirs && 396 make DESTDIR=${TEMPROOT} -DNO_MAKEDEV distribution;} || 397 { echo ''; 398 echo " *** FATAL ERROR: Cannot 'cd' to ${SOURCEDIR} and install files to the"; 399 echo " temproot environment"; 400 echo ''; 401 exit 1;} 402 403 # We really don't want to have to deal with these files, since 404 # master.passwd is the real file that should be compared, then 405 # the user should run pwd_mkdb if necessary. 406 # Only do this if we are not rerun'ing, since if we are the 407 # files will not be there. 408 # 409 rm ${TEMPROOT}/etc/spwd.db ${TEMPROOT}/etc/passwd ${TEMPROOT}/etc/pwd.db 410 411 # Avoid comparing the motd if the user specifies it in .mergemasterrc 412 case "${IGNORE_MOTD}" in 413 '') ;; 414 *) rm ${TEMPROOT}/etc/motd 415 ;; 416 esac 417 418 ;; # End of the "RERUN" test 419esac 420 421# Get ready to start comparing files 422 423case "${VERBOSE}" in 424'') ;; 425*) 426 echo '' 427 echo " *** The following files exist only in the installed version" 428 echo " of /etc. In the far majority of cases these files are" 429 echo " necessary parts of the system and should not be deleted," 430 echo " however because these files are not updated by this process" 431 echo " you might want to verify their status before rebooting your system." 432 echo '' 433 echo " *** Press [Enter] or [Return] key to continue" 434 read ANY_KEY 435 unset ANY_KEY 436 diff -qr /etc ${TEMPROOT}/etc | grep "^Only in /etc" | ${PAGER} 437 echo '' 438 echo " *** Press [Enter] or [Return] key to continue" 439 read ANY_KEY 440 unset ANY_KEY 441 ;; 442esac 443 444# Check umask if not specified on the command line, 445# and we are not doing an autorun 446# 447if [ -z "${NEW_UMASK}" -a -z "${AUTO_RUN}" ]; then 448 USER_UMASK=`umask` 449 case "${USER_UMASK}" in 450 0022) ;; 451 *) 452 echo '' 453 echo " *** Your umask is currently set to ${USER_UMASK}. By default, this script" 454 echo " installs all files with the same user, group and modes that" 455 echo " they are created with by ${SOURCEDIR}/Makefile, compared to" 456 echo " a umask of 022. This umask allows world read permission when" 457 echo " the file's default permissions have it." 458 echo " No world permissions can sometimes cause problems. A umask of" 459 echo " 022 will restore the default behavior, but is not mandatory." 460 echo " /etc/master.passwd is a special case. Its file permissions" 461 echo " will be 600 (rw-------) if installed." 462 echo '' 463 read -p "What umask should I use? [${USER_UMASK}] " NEW_UMASK 464 NEW_UMASK="${NEW_UMASK:-$USER_UMASK}" 465 ;; 466 esac 467 echo '' 468fi 469 470CONFIRMED_UMASK=${NEW_UMASK:-0022} 471 472# Warn users who have an /etc/sysconfig file 473# 474if [ -f /etc/sysconfig ]; then 475 echo " *** There is an /etc/sysconfig file on this system. Starting with" 476 echo " FreeBSD version 2.2.2 those settings have moved from /etc/sysconfig" 477 echo " to /etc/rc.conf. If you are upgrading an older system make sure" 478 echo " that you transfer your settings by hand from sysconfig to rc.conf and" 479 echo " install the rc.conf file. If you have already made this transition," 480 echo " you should consider renaming or deleting the /etc/sysconfig file." 481 echo '' 482 case "${AUTO_RUN}" in 483 '') 484 read -p "Continue with the merge process? [yes] " CONT_OR_NOT 485 case "${CONT_OR_NOT}" in 486 [nN]*) 487 exit 0 488 ;; 489 *) 490 echo " *** Continuing" 491 echo '' 492 ;; 493 esac 494 ;; 495 *) ;; 496 esac 497fi 498 499echo '' 500echo "*** Beginning comparison" 501echo '' 502 503cd "${TEMPROOT}" 504 505# Use the umask/mode information to install the files 506# Create directories as needed 507# 508mm_install () { 509 local INSTALL_DIR 510 INSTALL_DIR=${1#.} 511 INSTALL_DIR=${INSTALL_DIR%/*} 512 case "${INSTALL_DIR}" in 513 '') 514 INSTALL_DIR=/ 515 ;; 516 esac 517 518 if [ -n "${INSTALL_DIR}" -a ! -d "${INSTALL_DIR}" ]; then 519 DIR_MODE=`perl -e 'printf "%04o\n", (((stat("$ARGV[0]"))[2] & 07777) &~ oct("$ARGV[1]"))' "${TEMPROOT}/${INSTALL_DIR}" "${CONFIRMED_UMASK}"` 520 install -d -o root -g wheel -m "${DIR_MODE}" "${INSTALL_DIR}" 521 fi 522 523 FILE_MODE=`perl -e 'printf "%04o\n", (((stat("$ARGV[0]"))[2] & 07777) &~ oct("$ARGV[1]"))' "${1}" "${CONFIRMED_UMASK}"` 524 525 if [ ! -x "${1}" ]; then 526 case "${1#.}" in 527 /dev/MAKEDEV) 528 NEED_MAKEDEV=yes 529 ;; 530 /etc/aliases) 531 NEED_NEWALIASES=yes 532 ;; 533 /etc/login.conf) 534 NEED_CAP_MKDB=yes 535 ;; 536 /etc/master.passwd) 537 install -m 600 "${1}" "${INSTALL_DIR}" 538 NEED_PWD_MKDB=yes 539 DONT_INSTALL=yes 540 ;; 541 /.cshrc | /.profile) 542 case "${LINK_EXPLAINED}" in 543 '') 544 echo " *** Historically FreeBSD has had a hard link from" 545 echo " /.cshrc and /.profile to their namesakes in" 546 echo " /root. Please indicate your preference below" 547 echo " for bringing your installed files up to date." 548 echo '' 549 LINK_EXPLAINED=yes 550 ;; 551 esac 552 553 echo " Use 'd' to delete the temporary ${COMPFILE}" 554 echo " Use 'l' to delete the existing ${COMPFILE#.} and create the link" 555 echo '' 556 echo " Default is to leave the temporary file to deal with by hand" 557 echo '' 558 read -p " How should I handle ${COMPFILE}? [Leave it to install later] " HANDLE_LINK 559 case "${HANDLE_LINK}" in 560 [dD]*) 561 rm "${COMPFILE}" 562 echo '' 563 echo " *** Deleting ${COMPFILE}" 564 ;; 565 [lL]*) 566 echo '' 567 if [ -e "${COMPFILE#.}" ]; then 568 rm "${COMPFILE#.}" 569 fi 570 if ln "/root/${COMPFILE##*/}" "${COMPFILE#.}"; then 571 echo " *** Link from ${COMPFILE#.} to /root/${COMPFILE##*/} installed successfully" 572 rm "${COMPFILE}" 573 else 574 echo " *** Error linking ${COMPFILE#.} to /root/${COMPFILE##*/}, ${COMPFILE} will remain to install by hand" 575 fi 576 ;; 577 *) 578 echo " *** ${COMPFILE} will remain for your consideration" 579 ;; 580 esac 581 DONT_INSTALL=yes 582 ;; 583 esac 584 585 case "${DONT_INSTALL}" in 586 '') 587 install -m "${FILE_MODE}" "${1}" "${INSTALL_DIR}" 588 ;; 589 *) 590 unset DONT_INSTALL 591 ;; 592 esac 593 594 else 595 install -m "${FILE_MODE}" "${1}" "${INSTALL_DIR}" 596 fi 597 return $? 598} 599 600compare_ids () { 601 case "${1}" in 602 "${2}") 603 echo " *** Temp ${COMPFILE} and installed have the same ${IDTAG}, deleting" 604 rm "${COMPFILE}" 605 ;; 606 esac 607} 608 609# Using -size +0 avoids uselessly checking the empty log files created 610# by ${SOURCEDIR}/Makefile and the device entries in ./dev, but does 611# check the scripts in ./dev, as we'd like. 612# 613for COMPFILE in `find . -type f -size +0`; do 614 case "${STRICT}" in 615 '' | [Nn][Oo]) 616 # Compare CVS $Id's first so if the file hasn't been modified 617 # local changes will be ignored. 618 # If the files have the same $Id, delete the one in temproot so the 619 # user will have less to wade through if files are left to merge by hand. 620 # Take the $Id -> $FreeBSD tag change into account 621 # 622 FREEBSDID1=`grep "[$]FreeBSD:" ${COMPFILE#.} 2>/dev/null` 623 FREEBSDID2=`grep "[$]FreeBSD:" ${COMPFILE} 2>/dev/null` 624 625 if [ -n "${FREEBSDID1}" -a -n "${FREEBSDID2}" ]; then 626 IDTAG='$FreeBSD' 627 compare_ids "${FREEBSDID1}" "${FREEBSDID2}" 628 else 629 CVSID1=`grep "[$]Id:" ${COMPFILE#.} 2>/dev/null` 630 CVSID2=`grep "[$]Id:" ${COMPFILE} 2>/dev/null` 631 632 if [ -n "${CVSID1}" -a -n "${CVSID2}" ]; then 633 IDTAG='$Id' 634 compare_ids "${CVSID1}" "${CVSID2}" 635 fi 636 fi 637 ;; 638 esac 639 640 # If the file is still here either because the $Ids are different, the 641 # file doesn't have an $Id, or we're using STRICT mode; look at the diff. 642 # 643 if [ -f "${COMPFILE}" ]; then 644 645 # Do an absolute diff first to see if the files are actually different. 646 # If they're not different, delete the one in temproot. 647 # 648 if diff -q "${COMPFILE#.}" "${COMPFILE}" > /dev/null 2>&1; then 649 echo " *** Temp ${COMPFILE} and installed are the same, deleting" 650 rm "${COMPFILE}" 651 else 652 # Ok, the files are different, so show the user where they differ. Use user's 653 # choice of diff methods; and user's pager if they have one. Use more if not. 654 # Use unified diffs by default. Context diffs give me a headache. :) 655 # 656 case "${AUTO_RUN}" in 657 '') 658 # prompt user to install/delete/merge changes 659 diff_loop 660 ;; 661 *) 662 # If this is an auto run, make it official 663 echo " *** ${COMPFILE} will remain for your consideration" 664 ;; 665 esac # Auto run test 666 fi # Yes, the files are different 667 fi # Yes, the file still remains to be checked 668done # This is for the do way up there at the beginning of the comparison 669 670echo '' 671echo "*** Comparison complete" 672echo '' 673 674TEST_FOR_FILES=`find ${TEMPROOT} -type f -size +0 2>/dev/null` 675if [ -n "${TEST_FOR_FILES}" ]; then 676 echo "*** Files that remain for you to merge by hand:" 677 find "${TEMPROOT}" -type f -size +0 678fi 679 680case "${AUTO_RUN}" in 681'') 682 echo '' 683 read -p "Do you wish to delete what is left of ${TEMPROOT}? [no] " DEL_TEMPROOT 684 case "${DEL_TEMPROOT}" in 685 [yY]*) 686 if rm -rf "${TEMPROOT}"; then 687 echo " *** ${TEMPROOT} has been deleted" 688 else 689 echo " *** Unable to delete ${TEMPROOT}" 690 fi 691 ;; 692 *) 693 echo " *** ${TEMPROOT} will remain" 694 ;; 695 esac 696 ;; 697*) ;; 698esac 699 700case "${NEED_MAKEDEV}" in 701'') ;; 702*) 703 echo '' 704 echo "*** You installed a new /dev/MAKEDEV script, so make sure that you run" 705 echo " 'cd /dev && /bin/sh MAKEDEV all' to rebuild your devices" 706 ;; 707esac 708 709case "${NEED_NEWALIASES}" in 710'') ;; 711*) 712 echo '' 713 echo "*** You installed a new aliases file, so make sure that you run" 714 echo " 'newaliases' to rebuild your aliases database" 715 ;; 716esac 717 718case "${NEED_CAP_MKDB}" in 719'') ;; 720*) 721 echo '' 722 echo "*** You installed a login.conf file, so make sure that you run" 723 echo " 'cap_mkdb /etc/login.conf' to rebuild your login.conf database" 724 ;; 725esac 726 727case "${NEED_PWD_MKDB}" in 728'') ;; 729*) 730 echo '' 731 echo "*** You installed a new master.passwd file, so make sure that you run" 732 echo " 'pwd_mkdb -p /etc/master.passwd' to rebuild your password files" 733 ;; 734esac 735 736echo '' 737 738exit 0 739