diff options
| author | Natanael Copa <ncopa@alpinelinux.org> | 2014-10-06 14:12:21 +0000 |
|---|---|---|
| committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-10-06 14:12:21 +0000 |
| commit | 21dbf20f52bed1e9ca112acc550013be68e5c17b (patch) | |
| tree | d65cb88860b5102be90e55f4838adfa72d3160ba /testing/openvswitch/openvswitch.post-upgrade | |
| parent | 72a716fba2ea67a59b323af580cbcdeff1902231 (diff) | |
| download | aports-21dbf20f52bed1e9ca112acc550013be68e5c17b.tar.bz2 aports-21dbf20f52bed1e9ca112acc550013be68e5c17b.tar.xz | |
testing/openvswitch: fix creation/upgrade of database
Instead of create/update database from install script we do it from
init.d script. This is becase:
- we need /dev/urandom, which might not exist til until the mdev/udev
service is started. We cannot assume those are running during
install
- in case of upgrade, if the service is running (which is normally is)
we will get locking error because the db is in use.
We solve both those things by creating/upgrading the database before
starting it, from the init.d script.
fixes #3417
Diffstat (limited to 'testing/openvswitch/openvswitch.post-upgrade')
| -rw-r--r-- | testing/openvswitch/openvswitch.post-upgrade | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/testing/openvswitch/openvswitch.post-upgrade b/testing/openvswitch/openvswitch.post-upgrade deleted file mode 100644 index 3dfef0db6a..0000000000 --- a/testing/openvswitch/openvswitch.post-upgrade +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -NORMAL="\033[1;0m" -STRONG="\033[1;1m" -GREEN="\033[1;32m" - -print_green() { - local prompt="${GREEN}${STRONG}$1 ${NORMAL}" - printf "${prompt} %s\n" -} - -db="/etc/openvswitch/conf.db" -if [ -e "$db" ]; then - print_green "\nTrying schema migration for $db..." - ovsdb-tool convert "$db" "/usr/share/openvswitch/vswitch.ovsschema" -else - print_green "\nCreating new Open vSwitch database $db...\n" - ovsdb-tool create "$db" "/usr/share/openvswitch/vswitch.ovsschema" -fi - - |
