diff --git a/CHANGES b/CHANGES index 1a247ad6..d392de15 100644 --- a/CHANGES +++ b/CHANGES @@ -11,6 +11,7 @@ SVN HEAD Add detection of F71868A Add a PCI ID for new family 15h AMD processors Introduce automatic mode (--auto) + Detect incorrect non-interactive runs 3.3.4 (2013-05-27) sensors.conf.5: Mention "sensors -u" to get the raw feature names diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index b8e2b026..34ef5347 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -2517,7 +2517,7 @@ sub read_answer print "\n"; return ""; } - return ; + return || ""; } ################### @@ -7012,6 +7012,15 @@ sub main } unload_modules(); + + # Check if running non-interactively without --auto + if (!$opt{auto} && ! -t STDIN) { + print "***************************************************************\n". + "Warning: the preferred way to run this script non-interactively\n". + "is with option --auto. Other methods are discouraged and may\n". + "stop working at some point in the future.\n". + "***************************************************************\n\n"; + } } sub cleanup_on_int