From a74177cb86c1fcd3c5d62cd0aa299edd9e460491 Mon Sep 17 00:00:00 2001 From: ligc Date: Mon, 18 Nov 2013 17:46:07 +0800 Subject: [PATCH] fix for bug 4400, export DEBIAN_FRONTEND=noninteractive when running apt-get commands to avoid interactive procedure --- xCAT/postscripts/otherpkgs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xCAT/postscripts/otherpkgs b/xCAT/postscripts/otherpkgs index ca14f58c5..d851b493c 100755 --- a/xCAT/postscripts/otherpkgs +++ b/xCAT/postscripts/otherpkgs @@ -778,9 +778,9 @@ EOF` elif [ $hasapt -eq 1 ]; then apt_get_update_if_repos_changed $REPOFILE if [ $VERBOSE ]; then - echo "$envlist apt-get -y upgrade" + echo "$envlist DEBIAN_FRONTEND=noninteractive apt-get -y upgrade" fi - result=`eval $envlist apt-get -y upgrade 2>&1` + result=`eval $envlist DEBIAN_FRONTEND=noninteractive apt-get -y upgrade 2>&1` R=$? if [ $R -ne 0 ]; then RETURNVAL=$R @@ -826,9 +826,9 @@ EOF` elif [ $hasapt -eq 1 ]; then apt_get_update_if_repos_changed $REPOFILE if [ $VERBOSE ]; then - echo "apt-get -y remove $repo_pkgs_preremove" + echo "DEBIAN_FRONTEND=noninteractive apt-get -y remove $repo_pkgs_preremove" fi - result=`apt-get -y remove $repo_pkgs_preremove 2>&1` + result=`DEBIAN_FRONTEND=noninteractive apt-get -y remove $repo_pkgs_preremove 2>&1` R=$? if [ $R -ne 0 ]; then RETURNVAL=$R @@ -893,9 +893,9 @@ EOF` elif [ $hasapt -eq 1 ]; then apt_get_update_if_repos_changed $REPOFILE if [ $VERBOSE ]; then - echo "$envlist apt-get install -y --force-yes -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\" -q $repo_pkgs" + echo "$envlist DEBIAN_FRONTEND=noninteractive apt-get -q -y --force-yes install $repo_pkgs" fi - result=`eval $envlist apt-get install -y --force-yes -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\" -q $repo_pkgs 2>&1` + result=`eval $envlist DEBIAN_FRONTEND=noninteractive apt-get -q -y --force-yes install $repo_pkgs 2>&1` R=$? if [ $R -ne 0 ]; then RETURNVAL=$R