mergemaster.sh revision 65115
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 65115 2000-08-26 12:15:24Z ben $ 12 13PATH=/bin:/usr/bin:/usr/sbin:/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 # Avoid trying to update MAKEDEV if /dev is on a devfs 426 if mount | grep -q "devfs on /dev "; then 427 rm ${TEMPROOT}/dev/MAKEDEV ${TEMPROOT}/dev/MAKEDEV.local 428 fi 429 430 ;; # End of the "RERUN" test 431esac 432 433# Get ready to start comparing files 434 435case "${VERBOSE}" in 436'') ;; 437*) 438 echo '' 439 echo " *** The following files exist only in the installed version" 440 echo " of /etc. In the far majority of cases these files are" 441 echo " necessary parts of the system and should not be deleted," 442 echo " however because these files are not updated by this process" 443 echo " you might want to verify their status before rebooting your system." 444 echo '' 445 echo " *** Press [Enter] or [Return] key to continue" 446 read ANY_KEY 447 unset ANY_KEY 448 diff -qr /etc ${TEMPROOT}/etc | grep "^Only in /etc" | ${PAGER} 449 echo '' 450 echo " *** Press [Enter] or [Return] key to continue" 451 read ANY_KEY 452 unset ANY_KEY 453 ;; 454esac 455 456# Check umask if not specified on the command line, 457# and we are not doing an autorun 458# 459if [ -z "${NEW_UMASK}" -a -z "${AUTO_RUN}" ]; then 460 USER_UMASK=`umask` 461 case "${USER_UMASK}" in 462 0022) ;; 463 *) 464 echo '' 465 echo " *** Your umask is currently set to ${USER_UMASK}. By default, this script" 466 echo " installs all files with the same user, group and modes that" 467 echo " they are created with by ${SOURCEDIR}/Makefile, compared to" 468 echo " a umask of 022. This umask allows world read permission when" 469 echo " the file's default permissions have it." 470 echo " No world permissions can sometimes cause problems. A umask of" 471 echo " 022 will restore the default behavior, but is not mandatory." 472 echo " /etc/master.passwd is a special case. Its file permissions" 473 echo " will be 600 (rw-------) if installed." 474 echo '' 475 read -p "What umask should I use? [${USER_UMASK}] " NEW_UMASK 476 NEW_UMASK="${NEW_UMASK:-$USER_UMASK}" 477 ;; 478 esac 479 echo '' 480fi 481 482CONFIRMED_UMASK=${NEW_UMASK:-0022} 483 484# Warn users who have an /etc/sysconfig file 485# 486if [ -f /etc/sysconfig ]; then 487 echo " *** There is an /etc/sysconfig file on this system. Starting with" 488 echo " FreeBSD version 2.2.2 those settings have moved from /etc/sysconfig" 489 echo " to /etc/rc.conf. If you are upgrading an older system make sure" 490 echo " that you transfer your settings by hand from sysconfig to rc.conf and" 491 echo " install the rc.conf file. If you have already made this transition," 492 echo " you should consider renaming or deleting the /etc/sysconfig file." 493 echo '' 494 case "${AUTO_RUN}" in 495 '') 496 read -p "Continue with the merge process? [yes] " CONT_OR_NOT 497 case "${CONT_OR_NOT}" in 498 [nN]*) 499 exit 0 500 ;; 501 *) 502 echo " *** Continuing" 503 echo '' 504 ;; 505 esac 506 ;; 507 *) ;; 508 esac 509fi 510 511echo '' 512echo "*** Beginning comparison" 513echo '' 514 515cd "${TEMPROOT}" 516 517# Use the umask/mode information to install the files 518# Create directories as needed 519# 520mm_install () { 521 local INSTALL_DIR 522 INSTALL_DIR=${1#.} 523 INSTALL_DIR=${INSTALL_DIR%/*} 524 case "${INSTALL_DIR}" in 525 '') 526 INSTALL_DIR=/ 527 ;; 528 esac 529 530 if [ -n "${INSTALL_DIR}" -a ! -d "${INSTALL_DIR}" ]; then 531 DIR_MODE=`perl -e 'printf "%04o\n", (((stat("$ARGV[0]"))[2] & 07777) &~ oct("$ARGV[1]"))' "${TEMPROOT}/${INSTALL_DIR}" "${CONFIRMED_UMASK}"` 532 install -d -o root -g wheel -m "${DIR_MODE}" "${INSTALL_DIR}" 533 fi 534 535 FILE_MODE=`perl -e 'printf "%04o\n", (((stat("$ARGV[0]"))[2] & 07777) &~ oct("$ARGV[1]"))' "${1}" "${CONFIRMED_UMASK}"` 536 537 if [ ! -x "${1}" ]; then 538 case "${1#.}" in 539 /dev/MAKEDEV) 540 NEED_MAKEDEV=yes 541 ;; 542 /etc/mail/aliases) 543 NEED_NEWALIASES=yes 544 ;; 545 /etc/login.conf) 546 NEED_CAP_MKDB=yes 547 ;; 548 /etc/master.passwd) 549 install -m 600 "${1}" "${INSTALL_DIR}" 550 NEED_PWD_MKDB=yes 551 DONT_INSTALL=yes 552 ;; 553 /.cshrc | /.profile) 554 case "${LINK_EXPLAINED}" in 555 '') 556 echo " *** Historically FreeBSD has had a hard link from" 557 echo " /.cshrc and /.profile to their namesakes in" 558 echo " /root. Please indicate your preference below" 559 echo " for bringing your installed files up to date." 560 echo '' 561 LINK_EXPLAINED=yes 562 ;; 563 esac 564 565 echo " Use 'd' to delete the temporary ${COMPFILE}" 566 echo " Use 'l' to delete the existing ${COMPFILE#.} and create the link" 567 echo '' 568 echo " Default is to leave the temporary file to deal with by hand" 569 echo '' 570 read -p " How should I handle ${COMPFILE}? [Leave it to install later] " HANDLE_LINK 571 case "${HANDLE_LINK}" in 572 [dD]*) 573 rm "${COMPFILE}" 574 echo '' 575 echo " *** Deleting ${COMPFILE}" 576 ;; 577 [lL]*) 578 echo '' 579 if [ -e "${COMPFILE#.}" ]; then 580 rm "${COMPFILE#.}" 581 fi 582 if ln "/root/${COMPFILE##*/}" "${COMPFILE#.}"; then 583 echo " *** Link from ${COMPFILE#.} to /root/${COMPFILE##*/} installed successfully" 584 rm "${COMPFILE}" 585 else 586 echo " *** Error linking ${COMPFILE#.} to /root/${COMPFILE##*/}, ${COMPFILE} will remain to install by hand" 587 fi 588 ;; 589 *) 590 echo " *** ${COMPFILE} will remain for your consideration" 591 ;; 592 esac 593 DONT_INSTALL=yes 594 ;; 595 esac 596 597 case "${DONT_INSTALL}" in 598 '') 599 install -m "${FILE_MODE}" "${1}" "${INSTALL_DIR}" 600 ;; 601 *) 602 unset DONT_INSTALL 603 ;; 604 esac 605 606 else 607 install -m "${FILE_MODE}" "${1}" "${INSTALL_DIR}" 608 fi 609 return $? 610} 611 612compare_ids () { 613 case "${1}" in 614 "${2}") 615 echo " *** Temp ${COMPFILE} and installed have the same ${IDTAG}, deleting" 616 rm "${COMPFILE}" 617 ;; 618 esac 619} 620 621# Using -size +0 avoids uselessly checking the empty log files created 622# by ${SOURCEDIR}/Makefile and the device entries in ./dev, but does 623# check the scripts in ./dev, as we'd like. 624# 625for COMPFILE in `find . -type f -size +0`; do 626 case "${STRICT}" in 627 '' | [Nn][Oo]) 628 # Compare CVS $Id's first so if the file hasn't been modified 629 # local changes will be ignored. 630 # If the files have the same $Id, delete the one in temproot so the 631 # user will have less to wade through if files are left to merge by hand. 632 # Take the $Id -> $FreeBSD tag change into account 633 # 634 FREEBSDID1=`grep "[$]FreeBSD:" ${COMPFILE#.} 2>/dev/null` 635 FREEBSDID2=`grep "[$]FreeBSD:" ${COMPFILE} 2>/dev/null` 636 637 if [ -n "${FREEBSDID1}" -a -n "${FREEBSDID2}" ]; then 638 IDTAG='$FreeBSD' 639 compare_ids "${FREEBSDID1}" "${FREEBSDID2}" 640 else 641 CVSID1=`grep "[$]Id:" ${COMPFILE#.} 2>/dev/null` 642 CVSID2=`grep "[$]Id:" ${COMPFILE} 2>/dev/null` 643 644 if [ -n "${CVSID1}" -a -n "${CVSID2}" ]; then 645 IDTAG='$Id' 646 compare_ids "${CVSID1}" "${CVSID2}" 647 fi 648 fi 649 ;; 650 esac 651 652 # If the file is still here either because the $Ids are different, the 653 # file doesn't have an $Id, or we're using STRICT mode; look at the diff. 654 # 655 if [ -f "${COMPFILE}" ]; then 656 657 # Do an absolute diff first to see if the files are actually different. 658 # If they're not different, delete the one in temproot. 659 # 660 if diff -q "${COMPFILE#.}" "${COMPFILE}" > /dev/null 2>&1; then 661 echo " *** Temp ${COMPFILE} and installed are the same, deleting" 662 rm "${COMPFILE}" 663 else 664 # Ok, the files are different, so show the user where they differ. Use user's 665 # choice of diff methods; and user's pager if they have one. Use more if not. 666 # Use unified diffs by default. Context diffs give me a headache. :) 667 # 668 case "${AUTO_RUN}" in 669 '') 670 # prompt user to install/delete/merge changes 671 diff_loop 672 ;; 673 *) 674 # If this is an auto run, make it official 675 echo " *** ${COMPFILE} will remain for your consideration" 676 ;; 677 esac # Auto run test 678 fi # Yes, the files are different 679 fi # Yes, the file still remains to be checked 680done # This is for the do way up there at the beginning of the comparison 681 682echo '' 683echo "*** Comparison complete" 684echo '' 685 686TEST_FOR_FILES=`find ${TEMPROOT} -type f -size +0 2>/dev/null` 687if [ -n "${TEST_FOR_FILES}" ]; then 688 echo "*** Files that remain for you to merge by hand:" 689 find "${TEMPROOT}" -type f -size +0 690fi 691 692case "${AUTO_RUN}" in 693'') 694 echo '' 695 read -p "Do you wish to delete what is left of ${TEMPROOT}? [no] " DEL_TEMPROOT 696 case "${DEL_TEMPROOT}" in 697 [yY]*) 698 if rm -rf "${TEMPROOT}"; then 699 echo " *** ${TEMPROOT} has been deleted" 700 else 701 echo " *** Unable to delete ${TEMPROOT}" 702 fi 703 ;; 704 *) 705 echo " *** ${TEMPROOT} will remain" 706 ;; 707 esac 708 ;; 709*) ;; 710esac 711 712case "${NEED_MAKEDEV}" in 713'') ;; 714*) 715 echo '' 716 echo "*** You installed a new /dev/MAKEDEV script, so make sure that you run" 717 echo " 'cd /dev && /bin/sh MAKEDEV all' to rebuild your devices" 718 ;; 719esac 720 721case "${NEED_NEWALIASES}" in 722'') ;; 723*) 724 echo '' 725 echo "*** You installed a new aliases file, so make sure that you run" 726 echo " 'newaliases' to rebuild your aliases database" 727 ;; 728esac 729 730case "${NEED_CAP_MKDB}" in 731'') ;; 732*) 733 echo '' 734 echo "*** You installed a login.conf file, so make sure that you run" 735 echo " 'cap_mkdb /etc/login.conf' to rebuild your login.conf database" 736 ;; 737esac 738 739case "${NEED_PWD_MKDB}" in 740'') ;; 741*) 742 echo '' 743 echo "*** You installed a new master.passwd file, so make sure that you run" 744 echo " 'pwd_mkdb -p /etc/master.passwd' to rebuild your password files" 745 ;; 746esac 747 748echo '' 749 750exit 0 751