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

David Jansen jansen at strw.leidenuniv.nl
Tue Mar 27 09:29:51 UTC 2007


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'




More information about the fedora-list mailing list