mergemaster.sh revision 64625
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 64625 2000-08-13 19:32:19Z gshapiro $ 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 ! type "${PAGER%% *}" >/dev/null && [ -n "${PAGER}" ]; do 256 echo " *** Your PAGER environment variable specifies '${PAGER}', but" 257 echo " due to the limited PATH that I use for security reasons," 258 echo " I cannot execute it. So, what would you like to do?" 259 echo '' 260 echo " Use 'e' to exit mergemaster and fix your PAGER variable" 261 if [ -x /usr/bin/less -o -x /usr/local/bin/less ]; then 262 echo " Use 'l' to set PAGER to 'less' for this run" 263 fi 264 echo " Use 'm' to use plain old 'more' as your PAGER for this run" 265 echo '' 266 echo " Default is to use plain old 'more' " 267 echo '' 268 read -p "What should I do? [Use 'more'] " FIXPAGER 269 case "${FIXPAGER}" in 270 [eE]) 271 exit 0 272 ;; 273 [lL]) 274 if [ -x /usr/bin/less ]; then 275 PAGER=/usr/bin/less 276 elif [ -x /usr/local/bin/less ]; then 277 PAGER=/usr/local/bin/less 278 else 279 echo '' 280 echo " *** Fatal Error:" 281 echo " You asked to use 'less' as your pager, but I can't" 282 echo " find it in /usr/bin or /usr/local/bin" 283 exit 1 284 fi 285 ;; 286 [mM]|'') 287 PAGER=more 288 ;; 289 *) 290 echo '' 291 echo "invalid choice: ${FIXPAGER}" 292 esac 293 echo '' 294 done 295 ;; 296esac 297 298# If user has a pager defined, or got assigned one above, use it. 299# If not, use more. 300# 301PAGER=${PAGER:-more} 302 303if [ -n "${VERBOSE}" -a ! "${PAGER}" = "more" ]; then 304 echo " *** You have ${PAGER} defined as your pager so we will use that" 305 echo '' 306 sleep 3 307fi 308 309# Assign the diff flag once so we will not have to keep testing it 310# 311DIFF_FLAG=${DIFF_FLAG:--u} 312 313# Assign the source directory 314# 315SOURCEDIR=${SOURCEDIR:-/usr/src/etc} 316 317case "${RERUN}" in 318'') 319 # Set up the loop to test for the existence of the 320 # temp root directory. 321 # 322 TEST_TEMP_ROOT=yes 323 while [ "${TEST_TEMP_ROOT}" = "yes" ]; do 324 if [ -d "${TEMPROOT}" ]; then 325 echo "*** The directory specified for the temporary root environment," 326 echo " ${TEMPROOT}, exists. This can be a security risk if untrusted" 327 echo " users have access to the system." 328 echo '' 329 case "${AUTO_RUN}" in 330 '') 331 echo " Use 'd' to delete the old ${TEMPROOT} and continue" 332 echo " Use 't' to select a new temporary root directory" 333 echo " Use 'e' to exit mergemaster" 334 echo '' 335 echo " Default is to use ${TEMPROOT} as is" 336 echo '' 337 read -p "How should I deal with this? [Use the existing ${TEMPROOT}] " DELORNOT 338 case "${DELORNOT}" in 339 [dD]) 340 echo '' 341 echo " *** Deleting the old ${TEMPROOT}" 342 echo '' 343 rm -rf "${TEMPROOT}" 344 unset TEST_TEMP_ROOT 345 ;; 346 [tT]) 347 echo " *** Enter new directory name for temporary root environment" 348 read TEMPROOT 349 ;; 350 [eE]) 351 exit 0 352 ;; 353 '') 354 echo '' 355 echo " *** Leaving ${TEMPROOT} intact" 356 echo '' 357 unset TEST_TEMP_ROOT 358 ;; 359 *) 360 echo '' 361 echo "invalid choice: ${DELORNOT}" 362 echo '' 363 ;; 364 esac 365 ;; 366 *) 367 # If this is an auto-run, try a hopefully safe alternative then re-test anyway 368 TEMPROOT=/var/tmp/temproot.`date +%m%d.%H.%M.%S` 369 ;; 370 esac 371 else 372 unset TEST_TEMP_ROOT 373 fi 374 done 375 376 echo "*** Creating the temporary root environment in ${TEMPROOT}" 377 378 if mkdir -p "${TEMPROOT}"; then 379 echo " *** ${TEMPROOT} ready for use" 380 fi 381 382 if [ ! -d "${TEMPROOT}" ]; then 383 echo '' 384 echo " *** FATAL ERROR: Cannot create ${TEMPROOT}" 385 echo '' 386 exit 1 387 fi 388 389 echo " *** Creating and populating directory structure in ${TEMPROOT}" 390 echo '' 391 392 case "${VERBOSE}" in 393 '') ;; 394 *) 395 echo " *** Press [Enter] or [Return] key to continue" 396 read ANY_KEY 397 unset ANY_KEY 398 ;; 399 esac 400 401 { cd ${SOURCEDIR} && 402 make DESTDIR=${TEMPROOT} distrib-dirs && 403 make DESTDIR=${TEMPROOT} -DNO_MAKEDEV distribution;} || 404 { echo ''; 405 echo " *** FATAL ERROR: Cannot 'cd' to ${SOURCEDIR} and install files to the"; 406 echo " temproot environment"; 407 echo ''; 408 exit 1;} 409 410 # We really don't want to have to deal with these files, since 411 # master.passwd is the real file that should be compared, then 412 # the user should run pwd_mkdb if necessary. 413 # Only do this if we are not rerun'ing, since if we are the 414 # files will not be there. 415 # 416 rm ${TEMPROOT}/etc/spwd.db ${TEMPROOT}/etc/passwd ${TEMPROOT}/etc/pwd.db 417 418 # Avoid comparing the motd if the user specifies it in .mergemasterrc 419 case "${IGNORE_MOTD}" in 420 '') ;; 421 *) rm ${TEMPROOT}/etc/motd 422 ;; 423 esac 424 425 ;; # End of the "RERUN" test 426esac 427 428# Get ready to start comparing files 429 430case "${VERBOSE}" in 431'') ;; 432*) 433 echo '' 434 echo " *** The following files exist only in the installed version" 435 echo " of /etc. In the far majority of cases these files are" 436 echo " necessary parts of the system and should not be deleted," 437 echo " however because these files are not updated by this process" 438 echo " you might want to verify their status before rebooting your system." 439 echo '' 440 echo " *** Press [Enter] or [Return] key to continue" 441 read ANY_KEY 442 unset ANY_KEY 443 diff -qr /etc ${TEMPROOT}/etc | grep "^Only in /etc" | ${PAGER} 444 echo '' 445 echo " *** Press [Enter] or [Return] key to continue" 446 read ANY_KEY 447 unset ANY_KEY 448 ;; 449esac 450 451# Check umask if not specified on the command line, 452# and we are not doing an autorun 453# 454if [ -z "${NEW_UMASK}" -a -z "${AUTO_RUN}" ]; then 455 USER_UMASK=`umask` 456 case "${USER_UMASK}" in 457 0022) ;; 458 *) 459 echo '' 460 echo " *** Your umask is currently set to ${USER_UMASK}. By default, this script" 461 echo " installs all files with the same user, group and modes that" 462 echo " they are created with by ${SOURCEDIR}/Makefile, compared to" 463 echo " a umask of 022. This umask allows world read permission when" 464 echo " the file's default permissions have it." 465 echo " No world permissions can sometimes cause problems. A umask of" 466 echo " 022 will restore the default behavior, but is not mandatory." 467 echo " /etc/master.passwd is a special case. Its file permissions" 468 echo " will be 600 (rw-------) if installed." 469 echo '' 470 read -p "What umask should I use? [${USER_UMASK}] " NEW_UMASK 471 NEW_UMASK="${NEW_UMASK:-$USER_UMASK}" 472 ;; 473 esac 474 echo '' 475fi 476 477CONFIRMED_UMASK=${NEW_UMASK:-0022} 478 479# Warn users who have an /etc/sysconfig file 480# 481if [ -f /etc/sysconfig ]; then 482 echo " *** There is an /etc/sysconfig file on this system. Starting with" 483 echo " FreeBSD version 2.2.2 those settings have moved from /etc/sysconfig" 484 echo " to /etc/rc.conf. If you are upgrading an older system make sure" 485 echo " that you transfer your settings by hand from sysconfig to rc.conf and" 486 echo " install the rc.conf file. If you have already made this transition," 487 echo " you should consider renaming or deleting the /etc/sysconfig file." 488 echo '' 489 case "${AUTO_RUN}" in 490 '') 491 read -p "Continue with the merge process? [yes] " CONT_OR_NOT 492 case "${CONT_OR_NOT}" in 493 [nN]*) 494 exit 0 495 ;; 496 *) 497 echo " *** Continuing" 498 echo '' 499 ;; 500 esac 501 ;; 502 *) ;; 503 esac 504fi 505 506echo '' 507echo "*** Beginning comparison" 508echo '' 509 510cd "${TEMPROOT}" 511 512# Use the umask/mode information to install the files 513# Create directories as needed 514# 515mm_install () { 516 local INSTALL_DIR 517 INSTALL_DIR=${1#.} 518 INSTALL_DIR=${INSTALL_DIR%/*} 519 case "${INSTALL_DIR}" in 520 '') 521 INSTALL_DIR=/ 522 ;; 523 esac 524 525 if [ -n "${INSTALL_DIR}" -a ! -d "${INSTALL_DIR}" ]; then 526 DIR_MODE=`perl -e 'printf "%04o\n", (((stat("$ARGV[0]"))[2] & 07777) &~ oct("$ARGV[1]"))' "${TEMPROOT}/${INSTALL_DIR}" "${CONFIRMED_UMASK}"` 527 install -d -o root -g wheel -m "${DIR_MODE}" "${INSTALL_DIR}" 528 fi 529 530 FILE_MODE=`perl -e 'printf "%04o\n", (((stat("$ARGV[0]"))[2] & 07777) &~ oct("$ARGV[1]"))' "${1}" "${CONFIRMED_UMASK}"` 531 532 if [ ! -x "${1}" ]; then 533 case "${1#.}" in 534 /dev/MAKEDEV) 535 NEED_MAKEDEV=yes 536 ;; 537 /etc/mail/aliases) 538 NEED_NEWALIASES=yes 539 ;; 540 /etc/login.conf) 541 NEED_CAP_MKDB=yes 542 ;; 543 /etc/master.passwd) 544 install -m 600 "${1}" "${INSTALL_DIR}" 545 NEED_PWD_MKDB=yes 546 DONT_INSTALL=yes 547 ;; 548 /.cshrc | /.profile) 549 case "${LINK_EXPLAINED}" in 550 '') 551 echo " *** Historically FreeBSD has had a hard link from" 552 echo " /.cshrc and /.profile to their namesakes in" 553 echo " /root. Please indicate your preference below" 554 echo " for bringing your installed files up to date." 555 echo '' 556 LINK_EXPLAINED=yes 557 ;; 558 esac 559 560 echo " Use 'd' to delete the temporary ${COMPFILE}" 561 echo " Use 'l' to delete the existing ${COMPFILE#.} and create the link" 562 echo '' 563 echo " Default is to leave the temporary file to deal with by hand" 564 echo '' 565 read -p " How should I handle ${COMPFILE}? [Leave it to install later] " HANDLE_LINK 566 case "${HANDLE_LINK}" in 567 [dD]*) 568 rm "${COMPFILE}" 569 echo '' 570 echo " *** Deleting ${COMPFILE}" 571 ;; 572 [lL]*) 573 echo '' 574 if [ -e "${COMPFILE#.}" ]; then 575 rm "${COMPFILE#.}" 576 fi 577 if ln "/root/${COMPFILE##*/}" "${COMPFILE#.}"; then 578 echo " *** Link from ${COMPFILE#.} to /root/${COMPFILE##*/} installed successfully" 579 rm "${COMPFILE}" 580 else 581 echo " *** Error linking ${COMPFILE#.} to /root/${COMPFILE##*/}, ${COMPFILE} will remain to install by hand" 582 fi 583 ;; 584 *) 585 echo " *** ${COMPFILE} will remain for your consideration" 586 ;; 587 esac 588 DONT_INSTALL=yes 589 ;; 590 esac 591 592 case "${DONT_INSTALL}" in 593 '') 594 install -m "${FILE_MODE}" "${1}" "${INSTALL_DIR}" 595 ;; 596 *) 597 unset DONT_INSTALL 598 ;; 599 esac 600 601 else 602 install -m "${FILE_MODE}" "${1}" "${INSTALL_DIR}" 603 fi 604 return $? 605} 606 607compare_ids () { 608 case "${1}" in 609 "${2}") 610 echo " *** Temp ${COMPFILE} and installed have the same ${IDTAG}, deleting" 611 rm "${COMPFILE}" 612 ;; 613 esac 614} 615 616# Using -size +0 avoids uselessly checking the empty log files created 617# by ${SOURCEDIR}/Makefile and the device entries in ./dev, but does 618# check the scripts in ./dev, as we'd like. 619# 620for COMPFILE in `find . -type f -size +0`; do 621 case "${STRICT}" in 622 '' | [Nn][Oo]) 623 # Compare CVS $Id's first so if the file hasn't been modified 624 # local changes will be ignored. 625 # If the files have the same $Id, delete the one in temproot so the 626 # user will have less to wade through if files are left to merge by hand. 627 # Take the $Id -> $FreeBSD tag change into account 628 # 629 FREEBSDID1=`grep "[$]FreeBSD:" ${COMPFILE#.} 2>/dev/null` 630 FREEBSDID2=`grep "[$]FreeBSD:" ${COMPFILE} 2>/dev/null` 631 632 if [ -n "${FREEBSDID1}" -a -n "${FREEBSDID2}" ]; then 633 IDTAG='$FreeBSD' 634 compare_ids "${FREEBSDID1}" "${FREEBSDID2}" 635 else 636 CVSID1=`grep "[$]Id:" ${COMPFILE#.} 2>/dev/null` 637 CVSID2=`grep "[$]Id:" ${COMPFILE} 2>/dev/null` 638 639 if [ -n "${CVSID1}" -a -n "${CVSID2}" ]; then 640 IDTAG='$Id' 641 compare_ids "${CVSID1}" "${CVSID2}" 642 fi 643 fi 644 ;; 645 esac 646 647 # If the file is still here either because the $Ids are different, the 648 # file doesn't have an $Id, or we're using STRICT mode; look at the diff. 649 # 650 if [ -f "${COMPFILE}" ]; then 651 652 # Do an absolute diff first to see if the files are actually different. 653 # If they're not different, delete the one in temproot. 654 # 655 if diff -q "${COMPFILE#.}" "${COMPFILE}" > /dev/null 2>&1; then 656 echo " *** Temp ${COMPFILE} and installed are the same, deleting" 657 rm "${COMPFILE}" 658 else 659 # Ok, the files are different, so show the user where they differ. Use user's 660 # choice of diff methods; and user's pager if they have one. Use more if not. 661 # Use unified diffs by default. Context diffs give me a headache. :) 662 # 663 case "${AUTO_RUN}" in 664 '') 665 # prompt user to install/delete/merge changes 666 diff_loop 667 ;; 668 *) 669 # If this is an auto run, make it official 670 echo " *** ${COMPFILE} will remain for your consideration" 671 ;; 672 esac # Auto run test 673 fi # Yes, the files are different 674 fi # Yes, the file still remains to be checked 675done # This is for the do way up there at the beginning of the comparison 676 677echo '' 678echo "*** Comparison complete" 679echo '' 680 681TEST_FOR_FILES=`find ${TEMPROOT} -type f -size +0 2>/dev/null` 682if [ -n "${TEST_FOR_FILES}" ]; then 683 echo "*** Files that remain for you to merge by hand:" 684 find "${TEMPROOT}" -type f -size +0 685fi 686 687case "${AUTO_RUN}" in 688'') 689 echo '' 690 read -p "Do you wish to delete what is left of ${TEMPROOT}? [no] " DEL_TEMPROOT 691 case "${DEL_TEMPROOT}" in 692 [yY]*) 693 if rm -rf "${TEMPROOT}"; then 694 echo " *** ${TEMPROOT} has been deleted" 695 else 696 echo " *** Unable to delete ${TEMPROOT}" 697 fi 698 ;; 699 *) 700 echo " *** ${TEMPROOT} will remain" 701 ;; 702 esac 703 ;; 704*) ;; 705esac 706 707case "${NEED_MAKEDEV}" in 708'') ;; 709*) 710 echo '' 711 echo "*** You installed a new /dev/MAKEDEV script, so make sure that you run" 712 echo " 'cd /dev && /bin/sh MAKEDEV all' to rebuild your devices" 713 ;; 714esac 715 716case "${NEED_NEWALIASES}" in 717'') ;; 718*) 719 echo '' 720 echo "*** You installed a new aliases file, so make sure that you run" 721 echo " 'newaliases' to rebuild your aliases database" 722 ;; 723esac 724 725case "${NEED_CAP_MKDB}" in 726'') ;; 727*) 728 echo '' 729 echo "*** You installed a login.conf file, so make sure that you run" 730 echo " 'cap_mkdb /etc/login.conf' to rebuild your login.conf database" 731 ;; 732esac 733 734case "${NEED_PWD_MKDB}" in 735'') ;; 736*) 737 echo '' 738 echo "*** You installed a new master.passwd file, so make sure that you run" 739 echo " 'pwd_mkdb -p /etc/master.passwd' to rebuild your password files" 740 ;; 741esac 742 743echo '' 744 745exit 0 746