Can you tell us the model of the USB GPS device? I see some other posts about that same command:
stty -F /dev/ttyUSB0 57600 igncr clocal -echo -ixon <div><br></div><div>I want to understand which commands you are using are working or not (or if you just grabbed them from another source and tried to do the same thing in a different Linux OS with no luck)</div>
<div><br></div><div>Also, what Linux are you using?<br><br><div class="gmail_quote">On Wed, Feb 15, 2012 at 5:08 PM, Michael H. Warfield <span dir="ltr"><<a href="mailto:mhw@wittsend.com">mhw@wittsend.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Wed, 2012-02-15 at 14:24 -0500, Jim Kinney wrote:<br>
> add a line at the very beginning of the file as below:<br>
<br>
> #!/bin/bash<br>
<br>
</div>#!/bin/sh -<br>
<br>
If you're not specifically using incompatible bashisms, go with /bin/sh<br>
(which is bash anyways) just as a matter of good practice. Ends up<br>
doing the same thing, just better practice.<br>
<br>
The following dash ('-') is not NEARLY as important on Linux systems as<br>
it is on other flavors of *NIX because SUID scripts are not allowed, but<br>
it's generally a good idea (BCP) to include that '-' and is generally a<br>
standard practice in most "sh/bash/as/ksh" scripts. There use to be<br>
some old security vulnerabilities on SunOS with SUID scripts where the<br>
'-' was not included, which is where that practice originated.<br>
<div class="im"><br>
> better choice to have it start automagically is to write a script modeled<br>
> after the ones in /etc/init.d to set up the gps modem and have that process<br>
> run before the ntpd is started.<br>
<br>
</div>Concur. Create yourself a nice gps-setup script and link it to<br>
99-gps-setup to take care of those things. Pouring it into rc.local is<br>
an option but not nearly as elegant.<br>
<br>
Mike<br>
<div><div class="h5"><br>
> On Wed, Feb 15, 2012 at 1:54 PM, Ron Frazier<br>
> <<a href="mailto:atllinuxenthinfo@c3energy.com">atllinuxenthinfo@c3energy.com</a>>wrote:<br>
><br>
> > Hi all,<br>
> ><br>
> > I need to put this script file on my desktop so I can double click it<br>
> > after boot up to initialize my USB GPS. I haven't studied shell scripts<br>
> > and don't know the proper syntax to make it work. The log_daemon_msg<br>
> > seems to write on the screen in the /etc/init.d/ntp file, but doesn't<br>
> > work here. An even better approach would be to have these commands run<br>
> > during initial ntpd startup at boot time, but I don't know how to do that.<br>
> ><br>
> > # script file to stop ntpd, initialize the usb gps, then restart ntpd<br>
> > # Ron Frazier - 2012-02-15<br>
> ><br>
> > # stop ntpd<br>
> > sudo "/etc/init.d/ntp stop"<br>
> ><br>
> > # set up the com port<br>
> > log_daemon_msg "Setting /dev/ttyUSB0 comm parameters."<br>
> > sudo "stty -F /dev/ttyUSB0 57600 igncr clocal -echo -ixon"<br>
> ><br>
> > # set up link to /dev/gps5<br>
> > log_daemon_msg "Creating link to /dev/gps5."<br>
> > sudo "ln -T /dev/ttyUSB0 /dev/gps5"<br>
> ><br>
> > # restart ntpd<br>
> > sudo "/etc/init.d/ntp start"<br>
> ><br>
> > Any help is greatly appreciated.<br>
> ><br>
> > Sincerely,<br>
> ><br>
> > Ron<br>
> ><br>
> ><br>
> > --<br>
> ><br>
> > (PS - If you email me and don't get a quick response, you might want to<br>
> > call on the phone. I get about 300 emails per day from alternate energy<br>
> > mailing lists and such. I don't always see new messages very quickly.)<br>
> ><br>
> > Ron Frazier<br>
> ><br>
> > <a href="tel:770-205-9422" value="+17702059422">770-205-9422</a> (O) Leave a message.<br>
> > linuxdude AT <a href="http://c3energy.com" target="_blank">c3energy.com</a><br>
> ><br>
> > _______________________________________________<br>
> > Ale mailing list<br>
> > <a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
> > <a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
> > See JOBS, ANNOUNCE and SCHOOLS lists at<br>
> > <a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
> ><br>
><br>
><br>
><br>
> --<br>
> --<br>
> James P. Kinney III<br>
><br>
> As long as the general population is passive, apathetic, diverted to<br>
> consumerism or hatred of the vulnerable, then the powerful can do as they<br>
> please, and those who survive will be left to contemplate the outcome.<br>
</div></div>> - *2011 Noam Chomsky<br>
><br>
> <a href="http://heretothereideas.blogspot.com/" target="_blank">http://heretothereideas.blogspot.com/</a><br>
<div class="HOEnZb"><div class="h5">> *<br>
><br>
> _______________________________________________<br>
> Ale mailing list<br>
> <a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
> <a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
> See JOBS, ANNOUNCE and SCHOOLS lists at<br>
> <a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
<br>
--<br>
</div></div><span class="HOEnZb"><font color="#888888">Michael H. Warfield (AI4NB) | <a href="tel:%28770%29%20985-6132" value="+17709856132">(770) 985-6132</a> | mhw@WittsEnd.com<br>
/\/\|=mhw=|\/\/ | <a href="tel:%28678%29%20463-0932" value="+16784630932">(678) 463-0932</a> | <a href="http://www.wittsend.com/mhw/" target="_blank">http://www.wittsend.com/mhw/</a><br>
NIC whois: MHW9 | An optimist believes we live in the best of all<br>
PGP Key: 0x674627FF | possible worlds. A pessimist is sure of it!<br>
</font></span><br>_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
<br></blockquote></div><br></div>