c6fbc06834
Closes-bug: #1432515 Change-Id: Ibdab2b1719761757c8adc91873628b49fcf64d69
34 lines
781 B
Bash
Executable File
34 lines
781 B
Bash
Executable File
#!/bin/bash
|
|
|
|
cat >/etc/init/rc-sysinit.override <<"EOF"
|
|
start on umm
|
|
EOF
|
|
|
|
cat >/etc/init/failsafe.override <<"EOF"
|
|
stop on static-network-up or starting rc-sysinit or starting umm
|
|
EOF
|
|
|
|
cat >/etc/init/umm.conf <<"EOF"
|
|
# umm - Openstak maiteenace mode.
|
|
#
|
|
|
|
description "Openstack maintenance mode"
|
|
author "pzhurba@mirantis.com"
|
|
|
|
start on (filesystem and static-network-up) or failsafe-boot
|
|
|
|
emits umm
|
|
|
|
script
|
|
[ -f /usr/lib/umm/umm_svc ] && /usr/lib/umm/umm_svc
|
|
initctl emit umm
|
|
end script
|
|
EOF
|
|
|
|
cat >/etc/grub.d/55_umm << "EOF"
|
|
if [ -f /etc/grub.d/10_linux ] ; then
|
|
/etc/grub.d/10_linux | sed -n -e '/menuentry.*{/,/}/p' | sed -e "s/menuentry\s*'[^']*' /menuentry 'Unified maintenance mode (UMM) '/" -e 's/\(^\s*linux\s.*\)/\1 umm/' -e '/}/,$d'; echo '}'
|
|
fi
|
|
EOF
|
|
|
|
update-grub |