(OLD) (ARCHIVED) Puppy Linux Discussion Forum Forum Index (OLD) (ARCHIVED) Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info

This forum can also be accessed as http://oldforum.puppylinux.com
It is now read-only and serves only as archives.

Please register over the NEW forum
https://forum.puppylinux.com
and continue your work there. Thank you.

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 21 Jan 2021, 07:59
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
Canon printing system software problem
Moderators: Flash, Ian, JohnMurga
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 1 of 1 [2 Posts]  
Author Message
mikprog

Joined: 30 Mar 2020
Posts: 21

PostPosted: Tue 28 Apr 2020, 03:11    Post subject:  Canon printing system software problem  

I need help regarding to start up ccpd daemon of Canon CAPT printer driver at boot time.

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:
#!/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:
for service_script in /etc/init.d/*
do
 [ -x $service_script ] && $service_script start
done

This code launches every of init.d scripts one by one and waits until current script finish it's work before continue with next script. Reason of my problem is rc.services processes init.d scripts in alphabetic order
Code:
-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

So ccpd script started before cups and waits until infinity when cups will be started. (See above "while [ `ps awx | grep cupsd | grep -v grep | wc -l` -eq 0 ] do sleep 3"). But cups never been started until ccpd finished. Dead loop. All other init.d system services after ccpd are not started too. System becomes like zombie puppy.

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?
Back to top
View user's profile Send private message 
ozsouth

Joined: 01 Jan 2010
Posts: 862
Location: S.E Australia

PostPosted: Sun 03 May 2020, 04:30    Post subject:  

@mikprog - I sometimes do similar quick & dirty hacks. Whilst not ideal, sometimes it's for the best. Several shell scripts in Puppy have sleeps & naming for timing issues, as we see in /etc/init.d.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [2 Posts]  
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.8660s ][ Queries: 11 (0.7920s) ][ GZIP on ]