Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 1089  / 2 Years ago, mon, january 24, 2022, 10:40:02

I have an upstart conf that mounts a remote nfs at startup. Previously (in 12.10) it used



start on (local-filesystems and net-device-up IFACE=eth0)



in 13.04 this no longer works - I tried all variants you can think of eg, runlevels, IFACE=!lo etc.



To get it to work on 13.04, I changed back to the original start on, but used a script with a sleep 10 before the mount - this worked.



Has something changed in 13.04 that affects this behaviour?


More From » 13.04

 Answers
1

First of all, it should be 'IFACE!=lo' and not 'IFACE=!lo', but I'll assume this is a typo in your question.



That said, I'm having the exact same problem, and even tried different machines running 13.04 and the problem was reproduced. But from what I have gathered, no, nothing changed in Upstart 1.8.



I find that while 'net-device-up IFACE=*' does not work at all in the complex upstart job I wrote, it will work if I put it in simple job such as:



# /etc/init/debug.conf
start on (local-filesystems and net-device-up IFACE!=lo)
script
exec 1>>/tmp/log.file
echo "$0:$$:`date`: got called. Environment of job $JOB was:"
env
echo
end script


So, clearly there's something else going on here. I'm reading the /var/log/syslog and /var/log/kern.log logs but couldn't pick up a candidate for culprit yet.



My solution (to the other, complex job) was to leave out the interface and just write:



start on (local-filesystems and net-device-up)


This worked perfectly. However this is not good enough for me yet, since my script will be run on machines with multiple interfaces. I'll update this answer if I find a better solution than my workaround or yours.


[#31384] Wednesday, January 26, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
arbaour

Total Points: 346
Total Questions: 115
Total Answers: 105

Location: Oman
Member since Wed, Apr 12, 2023
1 Year ago
;