Index: usr.sbin/mergemaster/mergemaster.sh =================================================================== --- usr.sbin/mergemaster/mergemaster.sh (revision 287027) +++ usr.sbin/mergemaster/mergemaster.sh (working copy) @@ -247,6 +247,23 @@ read DISCARD } +press_to_continue_not_root () { + local DISCARD + if [ `/usr/bin/id -g` != 0 ]; then + echo ' *** Press the [Enter] or [Return] key to continue running as NOT root' + echo ' *** This script will require root privileges to be effective' + echo -n ' *** ^C to abort' + read DISCARD + fi +} + + +# +# Warn about running as non root +# +press_to_continue_not_root + + # Set the default path for the temporary root environment # TEMPROOT='/var/tmp/temproot'