ovirt-node 2.2.0 release
[ovirt-node.git] / scripts / persist
bloba6818dad9d4553ea85f1072479387d06af2ba613
1 #!/bin/bash
3 # Copyright (C) 2009, Red Hat, Inc.
4 # Written by Darryl L. Pierce <dpierce@redhat.com>
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; version 2 of the License.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18 # MA 02110-1301, USA. A copy of the GNU General Public License is
19 # also available at http://www.gnu.org/copyleft/gpl.html.
21 # Convenience wrapper to give access to the ovirt_store_config
22 # function in /usr/libexec/ovirt-functions
24 . /usr/libexec/ovirt-functions
26 ME=$(basename "$0")
27 warn() { printf '%s: %s\n' "$ME" "$*" >&2; }
28 help() { printf "Usage: $ME FILE ...\n
29 Copies the specified file to /config and then bindmounts it back at it's original location.
30 The file is stored with its full path detail.\n\n" >&2; exit 1;
32 die() { warn "$*"; help; exit 1; }
34 if [ $# -eq 0 ]; then die "You need to specify at least one file."; fi
36 ovirt_store_config $*