I use official Canon LBP 810 linux drivers installed on my BionicPup32. Installation procedure creates Canon printing system ccpd control script in init.d like
Code: Select all
#!/bin/sh
# startup script for Canon Printer Daemon for CUPS (ccpd)
if [ `ps awx | grep cupsd | grep -v grep | wc -l` -eq 0 ]; then
while [ `ps awx | grep cupsd | grep -v grep | wc -l` -eq 0 ]
do
sleep 3
done
sleep 5
fi
if [ -f /etc/rc.d/init.d/functions ]; then
if [ -f /etc/slackware-version ]; then
SYS_F="SL"
else
. /etc/rc.d/init.d/functions
SYS_F="RH"
fi
elif [ -x /sbin/startproc ]; then
SYS_F="Su"
elif [ -x /sbin/start-stop-daemon ]; then
SYS_F="De"
fi
etc.......
All of the puppy services initiated from init.d directory are started by simle /etc/rc.d/rc.services script
Code: Select all
for service_script in /etc/init.d/*
do
[ -x $service_script ] && $service_script start
done
Code: Select all
-rwxr-xr-x 1 root root 108 Mar 23 2019 00sys_logger
-rwxr-xr-x 1 root root 5435 Mar 23 2019 10alsa
-rw-r--r-- 1 root root 524 Mar 13 2019 crond
-rwxr-xr-x 1 root root 1547 Apr 27 15:44 ccpd
-rwxr-xr-x 1 root root 906 Sep 15 2019 cups
-rwxr-xr-x 1 root root 2806 Jun 14 2019 dbus
I can rename ccpd, for example, into zccpd to change script processing order. It works. But I feel it is not right way to solve problem. What right 'linux way' solution be?