From Swerdna’s helpful page on mounting network shares, he talks about adding the following command to the root’s crontab to delay mounting the drives in case of slow networks.
@reboot sleep 10;mount -a
I tried adding this but can’t find a crontab for root in /var/spool/cron/tabs. Should I create one or is it located somewhere else?
If you don’t like vi as the crontab editor, you can change it to Nautilus, Kwrite, whatever, by creating the file “profile.local” in directory /etc and giving it these contents:
Yes, I know how a user can change when she/he does not like the default, but as a system manager you must be very carefull changing the default (or even worse: without further notice).
Exception: when you are sure you are your only user and will forever be so.
In any case, I would prefer to do this in the .bashrc of root and not in a central place. And of course, as I try to propagate to the masses here, use
su -
and not
su
so root realy gets its environment and not that of a normal user.
I tried that but it said there was no crontab for root and that it would use an empty one. That threw me a little so I started doubting I was doing going about it correctly.
I would prefer to do this in the .bashrc of root and not in a central place.
I can’t find a .bashrc in root’s home directory. I assume I can just create one?
That is exactly what it says when you do this the first time. Go on! Type the letter i, type your crontab line, hit Esc, type** :wq **and there you are.