add a line at the very beginning of the file as below:<br><br>#!/bin/bash<br><br>better choice to have it start automagically is to write a script modeled after the ones in /etc/init.d to set up the gps modem and have that process run before the ntpd is started. <br>
<br><div class="gmail_quote">On Wed, Feb 15, 2012 at 1:54 PM, Ron Frazier <span dir="ltr"><<a href="mailto:atllinuxenthinfo@c3energy.com">atllinuxenthinfo@c3energy.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
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>
</blockquote></div><br><br clear="all"><br>-- <br>-- <br>James P. Kinney III<br><br>As long as the general population is passive, apathetic, diverted to
consumerism or hatred of the vulnerable, then the powerful can do as
they please, and those who survive will be left to contemplate the
outcome.<br>- <i><i><i><i>2011 Noam Chomsky<br><br><a href="http://heretothereideas.blogspot.com/" target="_blank">http://heretothereideas.blogspot.com/</a><br></i></i></i></i><br>