use 'sudo echo' avoid request passwd everytime if NOPASSWD set release-0.3 0.3
authorZhang Qiang <qiang.z.zhang@intel.com>
Mon, 10 Dec 2012 13:54:26 +0000 (21:54 +0800)
committerZhang Qiang <qiang.z.zhang@intel.com>
Wed, 12 Dec 2012 07:30:17 +0000 (15:30 +0800)
Change-Id: I203ad2384d758d4902d836a3ad78e38d226ff48f

depanneur

index b652927..530b0fd 100755 (executable)
--- a/depanneur
+++ b/depanneur
@@ -1485,7 +1485,7 @@ $SIG{'INT'} = $SIG{'TERM'} = sub {
 };
 
 $SIG{'ALRM'} = sub {
-    if (my_system("sudo -v") != 0) {
+    if (my_system("sudo echo -n") != 0) {
         error("sudo: failed to request passwd")
     } else {
         alarm(SUDOV_PERIOD);