…и помещаю несколько его копий в /opt/etc/ndm/netfilter.d. После перезагрузки:
# cat /opt/var/log/script.log
/opt/etc/ndm/netfilter.d/003-three.sh executed at Wed Jul 27 08:55:53 UTC 2016
/opt/etc/ndm/netfilter.d/005-five.sh executed at Wed Jul 27 08:55:53 UTC 2016
/opt/etc/ndm/netfilter.d/004-four.sh executed at Wed Jul 27 08:55:53 UTC 2016
/opt/etc/ndm/netfilter.d/001-one.sh executed at Wed Jul 27 08:55:53 UTC 2016
/opt/etc/ndm/netfilter.d/002-two.sh executed at Wed Jul 27 08:55:53 UTC 2016
/opt/etc/ndm/netfilter.d/003-three.sh executed at Wed Jul 27 08:55:53 UTC 2016
/opt/etc/ndm/netfilter.d/005-five.sh executed at Wed Jul 27 08:55:53 UTC 2016
/opt/etc/ndm/netfilter.d/004-four.sh executed at Wed Jul 27 08:55:53 UTC 2016
/opt/etc/ndm/netfilter.d/001-one.sh executed at Wed Jul 27 08:55:53 UTC 2016
/opt/etc/ndm/netfilter.d/002-two.sh executed at Wed Jul 27 08:55:53 UTC 2016
/opt/etc/ndm/netfilter.d/003-three.sh executed at Wed Jul 27 08:55:53 UTC 2016
/opt/etc/ndm/netfilter.d/005-five.sh executed at Wed Jul 27 08:55:53 UTC 2016
/opt/etc/ndm/netfilter.d/004-four.sh executed at Wed Jul 27 08:55:53 UTC 2016
/opt/etc/ndm/netfilter.d/001-one.sh executed at Wed Jul 27 08:55:53 UTC 2016
/opt/etc/ndm/netfilter.d/002-two.sh executed at Wed Jul 27 08:55:53 UTC 2016
/opt/etc/ndm/netfilter.d/003-three.sh executed at Wed Jul 27 08:55:55 UTC 2016
/opt/etc/ndm/netfilter.d/005-five.sh executed at Wed Jul 27 08:55:55 UTC 2016
/opt/etc/ndm/netfilter.d/004-four.sh executed at Wed Jul 27 08:55:55 UTC 2016
/opt/etc/ndm/netfilter.d/001-one.sh executed at Wed Jul 27 08:55:55 UTC 2016
/opt/etc/ndm/netfilter.d/002-two.sh executed at Wed Jul 27 08:55:55 UTC 2016
Параллельное исполнение призвано исключить тормоза? Для последовательного выполнения скриптов лучше написать собственную обвязку?
Question
Александр Рыжов
Столкнулся с тем, что скрипты /opt/etc/ndm/*.d/ выполняются в произвольном порядке.
Создаю скрипт со следующим содержимым…
# cat script_template.sh #!/bin/sh echo $0 executed at $(date) >> /opt/var/log/script.log
…и помещаю несколько его копий в /opt/etc/ndm/netfilter.d. После перезагрузки:
# cat /opt/var/log/script.log /opt/etc/ndm/netfilter.d/003-three.sh executed at Wed Jul 27 08:55:53 UTC 2016 /opt/etc/ndm/netfilter.d/005-five.sh executed at Wed Jul 27 08:55:53 UTC 2016 /opt/etc/ndm/netfilter.d/004-four.sh executed at Wed Jul 27 08:55:53 UTC 2016 /opt/etc/ndm/netfilter.d/001-one.sh executed at Wed Jul 27 08:55:53 UTC 2016 /opt/etc/ndm/netfilter.d/002-two.sh executed at Wed Jul 27 08:55:53 UTC 2016 /opt/etc/ndm/netfilter.d/003-three.sh executed at Wed Jul 27 08:55:53 UTC 2016 /opt/etc/ndm/netfilter.d/005-five.sh executed at Wed Jul 27 08:55:53 UTC 2016 /opt/etc/ndm/netfilter.d/004-four.sh executed at Wed Jul 27 08:55:53 UTC 2016 /opt/etc/ndm/netfilter.d/001-one.sh executed at Wed Jul 27 08:55:53 UTC 2016 /opt/etc/ndm/netfilter.d/002-two.sh executed at Wed Jul 27 08:55:53 UTC 2016 /opt/etc/ndm/netfilter.d/003-three.sh executed at Wed Jul 27 08:55:53 UTC 2016 /opt/etc/ndm/netfilter.d/005-five.sh executed at Wed Jul 27 08:55:53 UTC 2016 /opt/etc/ndm/netfilter.d/004-four.sh executed at Wed Jul 27 08:55:53 UTC 2016 /opt/etc/ndm/netfilter.d/001-one.sh executed at Wed Jul 27 08:55:53 UTC 2016 /opt/etc/ndm/netfilter.d/002-two.sh executed at Wed Jul 27 08:55:53 UTC 2016 /opt/etc/ndm/netfilter.d/003-three.sh executed at Wed Jul 27 08:55:55 UTC 2016 /opt/etc/ndm/netfilter.d/005-five.sh executed at Wed Jul 27 08:55:55 UTC 2016 /opt/etc/ndm/netfilter.d/004-four.sh executed at Wed Jul 27 08:55:55 UTC 2016 /opt/etc/ndm/netfilter.d/001-one.sh executed at Wed Jul 27 08:55:55 UTC 2016 /opt/etc/ndm/netfilter.d/002-two.sh executed at Wed Jul 27 08:55:55 UTC 2016
Параллельное исполнение призвано исключить тормоза? Для последовательного выполнения скриптов лучше написать собственную обвязку?
Link to comment
Share on other sites
4 answers to this question
Recommended Posts