Comment 23 for bug 1566508

Revision history for this message
mush (f-mutshe) wrote :

I wasn't able to fix the issue with the solutions proposed up there,
so I managed to find another workaround for autofs to be operational on startup.
The only difference is that im using unbound to resolve my DNS.
Just add this line under EnvironnementFile in /etc/systemd/system/multi-user.target.wants/sssd.service
  EnvironmentFile=-/etc/sysconfig/sssd
+ ExecStartPre=/bin/sleep 10

Then we have to create a script which is going to make sleep 10 sec restart unbound sleep again 10sec then restart autofs in /etc/init.d/restartautofs
After creating the script like the attachment I posted just run:
update-rc.d restartautofs defaults
To be sure the script starts at the end change the names of the 01restartautofs to S99restartautofs
(in each levels /etc/rc2.d/ /etc/rc3.d/ /etc/rc4.d/ /etc/rc5.d/)
So we are good to go with this workaround sssd and networking services are ok before autofs start so its mapping correctly.