mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-23 19:25:25 +03:00
21 lines
513 B
Bash
21 lines
513 B
Bash
#!/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
|
|
|
|
|