[ale] help please getting script file to work
Jim Kinney
jim.kinney at gmail.com
Wed Feb 15 14:24:54 EST 2012
add a line at the very beginning of the file as below:
#!/bin/bash
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.
On Wed, Feb 15, 2012 at 1:54 PM, Ron Frazier
<atllinuxenthinfo at c3energy.com>wrote:
> Hi all,
>
> I need to put this script file on my desktop so I can double click it
> after boot up to initialize my USB GPS. I haven't studied shell scripts
> and don't know the proper syntax to make it work. The log_daemon_msg
> seems to write on the screen in the /etc/init.d/ntp file, but doesn't
> work here. An even better approach would be to have these commands run
> during initial ntpd startup at boot time, but I don't know how to do that.
>
> # script file to stop ntpd, initialize the usb gps, then restart ntpd
> # Ron Frazier - 2012-02-15
>
> # stop ntpd
> sudo "/etc/init.d/ntp stop"
>
> # set up the com port
> log_daemon_msg "Setting /dev/ttyUSB0 comm parameters."
> sudo "stty -F /dev/ttyUSB0 57600 igncr clocal -echo -ixon"
>
> # set up link to /dev/gps5
> log_daemon_msg "Creating link to /dev/gps5."
> sudo "ln -T /dev/ttyUSB0 /dev/gps5"
>
> # restart ntpd
> sudo "/etc/init.d/ntp start"
>
> Any help is greatly appreciated.
>
> Sincerely,
>
> Ron
>
>
> --
>
> (PS - If you email me and don't get a quick response, you might want to
> call on the phone. I get about 300 emails per day from alternate energy
> mailing lists and such. I don't always see new messages very quickly.)
>
> Ron Frazier
>
> 770-205-9422 (O) Leave a message.
> linuxdude AT c3energy.com
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
--
--
James P. Kinney III
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.
- *2011 Noam Chomsky
http://heretothereideas.blogspot.com/
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ale.org/pipermail/ale/attachments/20120215/b3b61cd3/attachment.html
More information about the Ale
mailing list