[FredLUG] Re: Help with a Cron job
Chris O'Donnell
chrisod at gmail.com
Wed Jun 10 14:27:02 EDT 2009
Welcome! I just figured out that solution a couple of days ago. I need to tinker with it and see if I can get Ubuntu to invoke rc.local after login via a script or start up command.
----- "Dan Hamilton" <dghamilton1973 at gmail.com> wrote:
> Apologies if I missed that, just got accepted into the group. Heya
> all!
>
>
> On Wed, Jun 10, 2009 at 1:52 PM, Chris O'Donnell < chrisod at gmail.com >
> wrote:
>
>
>
> That's exactly what I have working right now. I don't want to bypass
> Network Manager as I'm fairly mobile with my laptop and don't want to
> manually configure a wireless connection every time I'm out with the
> laptop.
>
>
>
>
> ----- "Dan Hamilton" < dghamilton1973 at gmail.com > wrote:
>
> > You can also try a "hack approach" by doing something like the
> > following in your rc.local
> >
> >
> > sleep 60 && run_mount_command &
> >
> >
> > This will do a couple of things...
> >
> > 1) it will background the entire line due to the '&' at the end
> > (obviously)
> > 2) it will run sleep THEN run your mount command.
> >
> > I.e. this will allow your init processes to continue on, and then
> > about 60 seconds later it will try the mount command, presumably
> after
> > network manager has loaded and established your connection. You can
> > always tweak the sleep setting to make it tighter or looser as
> needed.
> >
> > As I said this is a "hack" approach, but bypassing networkmanager
> can
> > feel pretty hackish too since it will involve hard coding your
> network
> > settings at the /etc/sysconfig (or whatever your distro requires)
> > level. If this is a laptop, you could regret that the next time you
> > try to quickly access a public wifi quickly via networkmanager.
> >
> >
> > On Wed, Jun 10, 2009 at 1:28 PM, Peter Larsen < ego.alter at gmail.com
> >
> > wrote:
> >
> >
> >
> > NetworkManager is a end-user tool. Just by-pass it. Make your NIC
> not
> > managed by NetworkManager and use the _network in your mount list,
> and
> > things should sync the way you want them to. If you switch between
> > hardware and wireless you may have to do a little bit of tweaking in
> > your network startup script to choose the right one to enable.
> >
> > NetworkManager is a nice product, but it doesn't cut it for
> enterprise
> > needs. If you need connection to a directory server, home
> directories
> > etc. over the network before or during login, then network manager
> > fails
> > you. But remember, NetworkManager is there to make your network
> easier
> > to setup in user-space. The traditional way of running/configuring
> > network devices are still present.
> >
> > Simply put NM_CONTROLLED=no into the ifcfg-eth? script and that
> > interface is no longer "tampered with" by NetworkManager.
> >
> > Add _netdev to your fstab options for any mountpoint that depends on
> > having a network connection.
> >
> > --
> > Peter Larsen < ego.alter at gmail.com >
> >
> > On Sat, 2009-06-06 at 14:15 -0400, Chris O'Donnell wrote:
> > > I'm still fighting the problem of my NAT drive not mounting on
> boot.
> > > It appears as through I don't have a network connection until I
> > > actually log in, thus there is no way I can auto mount a network
> > drive
> > > on boot. It has something to do with some changes in Network
> Manager
> > > with Ubuntu 8.10. I went straight from 8.04 to 9.04 so I never saw
> > the
> > > problem until my recent upgrade.
> > >
> > > I can't get rc.local to work either. The boot process hangs on
> > > mount.nfs DNS resolution failed... so the rc.local script never
> runs
> > > since boot never completes properly. X starts up normally so the
> > error
> > > is transparent unless you open a console and look for the error
> > > message. I've commented out the mount commands in fstab for the
> NAT
> > > drive, so I have no idea why my laptop is still looking for a NFS
> > > server at 192.168.11.7. However, if rc.local runs before log in it
> > > won't matter as I still won't have a network connection.
> > >
> > > So my new idea is run a cron job to mount the drive about 2
> minutes
> > > after log in or something like that. However, I can't seem to
> figure
> > > out how to do that. Help?
> > >
> > >
> >
> >
> >
> >
> >
> >
> > --
> > Dan Hamilton
>
>
>
> >
> >
>
>
>
>
>
> --
> Dan Hamilton
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "FredLUG" group.
To post to this group, send email to fredlug at googlegroups.com
To unsubscribe from this group, send email to fredlug+unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/fredlug?hl=en
-~----------~----~----~----~------~----~------~--~---
More information about the Fredlug
mailing list