rc script running twice ???

Drew Van Zandt drew.vanzandt at gmail.com
Thu Jan 27 15:42:14 EST 2011


I've never used the ps f view (yes, I know...how odd); handy.

root       470  1.1  2.4   2992  1516 ttyS0    Ss+  00:00   0:00 /bin/sh
/etc/init.d/rc 2
root       496  0.1  1.9   2808  1232 ttyS0    S+   00:00   0:00  \_ /bin/sh
/etc/rc2.d/S40init_xuarts start
root       498  0.0  0.8   2808   504 ttyS0    S+   00:00   0:00      \_
/bin/sh /etc/rc2.d/S40init_xuarts start
root       500  0.1  0.9   1676   576 ttyS0    S+   00:00   0:00          \_
sed s/ttyname=//

root       502  0.0  0.4   1712   308 ?        Ss   00:00   0:00
/usr/local/bin/xuartctl -d --speed=115200 --mode=7e1 -p 1
root       503  0.0  0.3   1720   244 ?        Ss   00:00   0:00
/usr/local/bin/xuartctl -d --speed=115200 --mode=7e1 -p 1

Note the -d daemonizes xuartctl in the script below:
ts7500:/etc/init.d# more init_xuarts.sh
#!/bin/sh
# Server for all first.
xuartctl -d
# Barcode
ln -s -f `/usr/local/bin/xuartctl -d --speed=115200 --mode=7e1 -p 1 2>&1
|sed s/ttyname=//` /dev/barcode
# Copleys
ln -s -f `/usr/local/bin/xuartctl -d --speed=9600 --mode=8n1 -p 2 2>&1 |sed
s/ttyname=//` /dev/copley
# Watlows
ln -s -f `/usr/local/bin/xuartctl -d --speed=38400 --mode=8n1 -p 5 2>&1 |sed
s/ttyname=//` /dev/watlow


On Thu, Jan 27, 2011 at 3:21 PM, Joshua Judson Rosen
<rozzin at geekspace.com>wrote:

> Drew Van Zandt <drew.vanzandt at gmail.com> writes:
> >
> > Debian Linux (embedded), I'm in runlevel 2, and I'm seeing this when I
> run ps
> > aux:
> >
> > root       496  0.0  1.9   2808  1232 ttyS0    S+   00:00   0:00 /bin/sh
> /etc/
> > rc2.d/S40init_xuarts start
> > root       498  0.0  0.8   2808   504 ttyS0    S+   00:00   0:00 /bin/sh
> /etc/
> > rc2.d/S40init_xuarts start
> >
> > S40init_xuarts is a script of mine that I just put in /etc/init.d/ and
> linked
> > from rc2.d.
> >
> > Why is it running twice?
>
> Can you do this again, but with "ps faux" instead--to capture the
> process-hierarchy?
>
> --
> "Don't be afraid to ask (λf.((λx.xx) (λr.f(rr))))."
>



-- 
*
Drew Van Zandt
Cam # US2010035593 (M:Liam Hopkins R: Bastian Rotgeld A:Walton Shipley)
*Artisan's Asylum Craft Lead, Electronics & Robotics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.gnhlug.org/mailman/private/gnhlug-discuss/attachments/20110127/4dbee152/attachment.html 


More information about the gnhlug-discuss mailing list