Originally posted by: rc015116
The CUPS init script (/etc/rc.d/init.d/cups) does not contain the code for finding the cupsd pid on AIX. This causes the commands that interact with the running cupsd process to not work. "reload" and "restart" both start a new cupsd process when there is already one running. "status" always reports "scheduler is not running" whether cupsd is running or not. "stop" does not stop cupsd. Only "start" works.
Below is my suggested fix for this. The command that is used by other OSes to find the cupsd pid can also be used on AIX, so I added AIX to the list of compatible OSes.
--- cups 2018-03-28 23:44:33.000000000 -0500
+++ cups_new 2018-03-28 23:46:54.000000000 -0500
@@ -132,7 +132,7 @@
SunOS*)
pid=`ps -e | nawk '{if (match($4, ".*/cupsd$") || $4 == "cupsd") print $1}'`
;;
- Linux* | *BSD* | Darwin*)
+ Linux* | *BSD* | Darwin* | AIX*)
pid=`ps ax | awk '{if (match($5, ".*/cupsd$") || $5 == "cupsd") print $1}'`
;;
*)