Re: Trouble mounting NFS shares in %post script of a kickstart FC6 install

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I ran into the problem with the nfs mounts from kickstart too, and
worked around it in a different way:

%post
echo "@reboot mount adminserver:/disk0 /mnt;/mnt/bin/ModifyFedora > /var/log/modifyfedora.log 2>&1" > /var/spool/cron/root

So basically, all %post does is to set up a cronjob to run after reboot
(or actually, after crond restarts), and the cronjob mount the nfs disk
and runs the script that pulls in my local modifications for Fedora
Advantage: not only nfs works properly, but also other services are
available if needed (eg usernames from LDAP).
But take care that the script removes or overwrites /var/spool/cron/root
otherwise this script will be re-executed the next time crond starts and
that is probably not what was intended

David Jansen

PS: the @reboot "cron magic" is probably not well know, but see 'man 5 crontab'


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux