8d138e0e0d
Move umm related file from puppet to a package and change deploing process Change-Id: I466d89158fab523981ea002e83933696284a11ac Closes-bug:#1508274
36 lines
810 B
Bash
Executable File
36 lines
810 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
|
|
|
|
chmod +x /etc/grub.d/55_umm
|
|
|
|
update-grub |