diff options
author | Robert Xu <robxu9@gmail.com> | 2012-03-31 14:28:06 -0400 |
---|---|---|
committer | Robert Xu <robxu9@gmail.com> | 2012-03-31 14:28:06 -0400 |
commit | 59dd46ef985a719579132efa6a9aa49bfeeae112 (patch) | |
tree | 93d8c721ff263e67aaf59e364496862872ded8fb /opensuse/core/tdelibs/kdeprint-restart-cupsd.diff | |
parent | c141f0bc29b6e2eeda5ca08a043d26546a1427f9 (diff) | |
download | tde-packaging-59dd46ef985a719579132efa6a9aa49bfeeae112.tar.gz tde-packaging-59dd46ef985a719579132efa6a9aa49bfeeae112.zip |
better late than never, hm...
Diffstat (limited to 'opensuse/core/tdelibs/kdeprint-restart-cupsd.diff')
-rw-r--r-- | opensuse/core/tdelibs/kdeprint-restart-cupsd.diff | 38 |
1 files changed, 11 insertions, 27 deletions
diff --git a/opensuse/core/tdelibs/kdeprint-restart-cupsd.diff b/opensuse/core/tdelibs/kdeprint-restart-cupsd.diff index d464098eb..2fc7cccb3 100644 --- a/opensuse/core/tdelibs/kdeprint-restart-cupsd.diff +++ b/opensuse/core/tdelibs/kdeprint-restart-cupsd.diff @@ -1,32 +1,16 @@ -Index: kdeprint/cups/cupsdconf2/cupsddialog.cpp +Index: tdeprint/cups/cupsdconf2/cupsddialog.cpp =================================================================== ---- kdeprint/cups/cupsdconf2/cupsddialog.cpp.orig -+++ kdeprint/cups/cupsdconf2/cupsddialog.cpp -@@ -45,6 +45,7 @@ - #include <kguiitem.h> - #include <kprocess.h> - -+#include <stdlib.h> - #include <signal.h> - #include <cups/cups.h> - -@@ -205,15 +206,13 @@ bool CupsdDialog::restartServer(QString& - } - else +--- tdeprint/cups/cupsdconf2/cupsddialog.cpp.orig ++++ tdeprint/cups/cupsdconf2/cupsddialog.cpp +@@ -208,7 +208,10 @@ { -+ KProcess proc; bool success = false; - if (getuid() == 0 ) -- success = (::kill(serverPid, SIGHUP) == 0); -+ proc << "rccups" << "force-reload"; - else -- { -- KProcess proc; -- proc << "kdesu" << "-c" << "kill -SIGHUP " + QString::number( serverPid ); -- success = proc.start( KProcess::Block ) && proc.normalExit(); -- } -+ proc << "kdesu" << "-c" << "rccups" << "force-reload"; -+ success = proc.start( KProcess::Block ) && proc.normalExit(); + KProcess proc; +- proc << "tdesu" << "-c" << "/etc/init.d/cupsys restart"; ++ if (getuid() == 0 ) ++ proc << "rccups" << "force-reload"; ++ else ++ proc << "tdesu" << "-c" << "rccups" << "force-reload"; + success = proc.start( KProcess::Block ) && proc.normalExit(); if( !success ) msg = i18n("Unable to restart CUPS server (pid = %1)").arg(serverPid); - } |