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

Re: script



vdemart@supereva.it wrote:
>I'm editing a bash script but I need to execute in the given order
>each command to completion. E.g.
>
>ifup eth0
>/etc/init.d/./samba start
>/etc/init.d/./hylafax start
             ^^ (not needed)
>Unfortunately putting this lines in a file, while the script is still
>executing ifup eth0, samba and then hylafax are executed, messing it
>all up.

No, shell scripts are always executed in sequence as you describe. Your
problem is that 'ifup' exits before networking fully comes up, so you'll
need to find some other way of pausing until that's done (e.g. using
'sleep' in a while loop that tests if networking is up, or whatever).

Cheers,

-- 
Colin Watson                                  [cjwatson@flatline.org.uk]



Reply to: