summaryrefslogtreecommitdiffstats
path: root/opensuse/core/tdelibs/kdeprint-restart-cupsd.diff
blob: 2fc7cccb38c770a80cc809ab1e3cb6131c396f0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Index: tdeprint/cups/cupsdconf2/cupsddialog.cpp
===================================================================
--- tdeprint/cups/cupsdconf2/cupsddialog.cpp.orig
+++ tdeprint/cups/cupsdconf2/cupsddialog.cpp
@@ -208,7 +208,10 @@
 	{
                 bool success = false;
 		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);