[ale] help please getting script file to work

Pete Hardie pete.hardie at gmail.com
Wed Feb 15 14:22:56 EST 2012


You might try putting the script in /etc/rc.local, so that it will run
at boot, and as root, simplifying things.

here's a link to a Fedora 16 discussion about similar things, that
might provde some hints:
http://forums.fedoraforum.org/showthread.php?t=276167

On Wed, Feb 15, 2012 at 13:54, 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



-- 
Pete Hardie
--------
Better Living Through Bitmaps



More information about the Ale mailing list