[ale] help please getting script file to work

Erik Mathis erik at mathists.com
Wed Feb 15 14:30:37 EST 2012


I suspect sudo is waiting for a password, just remove that and run as
root. (sudo bash)

As for run at boot, the simple way is to just throw it in /etc/rc.local
I dont know what distro you are using, but you can make a sysV style
script or the new fangeld upstart script.

-Erik-

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



More information about the Ale mailing list