--- old/usr/src/lib/brand/lx/zone/lx_install.ksh Wed Feb 11 09:21:14 2009 +++ new/usr/src/lib/brand/lx/zone/lx_install.ksh Wed Feb 11 09:21:13 2009 @@ -85,6 +85,8 @@ no_log=$(gettext "Could not create log directory '%s'") no_logfile=$(gettext "Could not create log file '%s'") +root_full=$(gettext "Zonepath root %s exists and contains data; remove or move aside prior to install.") + install_zone=$(gettext "Installing zone '%s' at root directory '%s'") install_from=$(gettext "from archive '%s'") @@ -457,6 +459,15 @@ fi fi +# +# Check for a non-empty root. +# +cnt=`ls $install_root | wc -l` +if [ $cnt -ne 0 ]; then + screenlog "$root_full" "$install_root" + exit $int_code +fi + if [[ ! -d "$logdir" ]] then if ! mkdir -p "$logdir" 2>/dev/null; then