I can't find any reports on this, but it seems there is a pretty obviously problem with run after reboot scripts in Casper Imaging. (9.xxx)
The enrolment script is called by a launchdaemon, if the jss is not reachable, it's called again on a 5 min interval. Pretty likely that the first attempt will fire before your network has started. Slow but it should get you enrolled eventually.
The postinstall.sh script calls scripts via the jamf bin, since the scripts are in the JSS they are no longer copied to the local mac PostInstall resources folder.
The postinstall.sh has no waits for enrolment. a simple
while [ -f /path/enrollment.sh ] loop would almost suffice here.
I am sure there is a defect open for this.. ? I haven't used this feature since 8... so not sure when it showed up. Currently on 9.4.
