diff options
author | Robert Schwebel <r.schwebel@pengutronix.de> | 2008-05-23 04:41:25 +0000 |
---|---|---|
committer | Robert Schwebel <r.schwebel@pengutronix.de> | 2008-05-23 04:41:25 +0000 |
commit | 2e14e3306923251dbdef7059f3db8cec5ed49e55 (patch) | |
tree | 78e903c866b5b963b8bf0f681fb56e99257a3237 /bin | |
parent | 6d278f7071237f8211247b2e88b260b7eb16bc8f (diff) | |
download | ptxdist-2e14e3306923251dbdef7059f3db8cec5ed49e55.tar.gz ptxdist-2e14e3306923251dbdef7059f3db8cec5ed49e55.tar.xz |
* ptxdist: In silent mode, we cannot redirect input. So use
oldconfig instead of silentoldconfig if somebody tries to
automate us.
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@8214 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ptxdist | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/ptxdist b/bin/ptxdist index 44b073f5e..eef0b1e14 100755 --- a/bin/ptxdist +++ b/bin/ptxdist @@ -727,7 +727,14 @@ newpacket() { } oldconfig_action() { - "${PTXDIST_TOPDIR}/scripts/kconfig/conf" -s "${kconfig}" + # In silent mode, we cannot redirect input. So use oldconfig + # instead of silentoldconfig if somebody tries to automate us. + tty -s + if [ "$?" = "0" ]; then + "${PTXDIST_TOPDIR}/scripts/kconfig/conf" -s "${kconfig}" + else + "${PTXDIST_TOPDIR}/scripts/kconfig/conf" -o "${kconfig}" + fi } |