Ricardo Marin Matinata
2010-Mar-25 17:30 UTC
[Ovirt-devel] [PATCH] Allow persistance of empty config files in ovirt_store_config v2
This fix enables the persistance of empty configuration files during firstboot, in ovirt_store_config, so configuration files like ssh/ssl keys that are dynamically generated (i.e. content is not known until the node has booted at least one time) to well known locations can be pre set for persistance. Signed-off-by: Ricardo Marin Matinata <matinata at br.ibm.com> --- scripts/ovirt-functions | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions index 482441a..1c3336d 100644 --- a/scripts/ovirt-functions +++ b/scripts/ovirt-functions @@ -495,9 +495,9 @@ ovirt_store_config() { fi if $persist_it; then - # skip if file does not exist or is empty - if [ ! -s "${filename}" ]; then - printf " Skipping, file '${filename}' does not exist or is empty\n" + # skip if file does not exist + if [ ! -e "${filename}" ]; then + printf " Skipping, file '${filename}' does not exist\n" continue fi # skip if already bind-mounted -- 1.6.6.1
Ricardo Marin Matinata
2010-Apr-23 09:48 UTC
[Ovirt-devel] [PATCH] Allow persistance of empty config files in ovirt_store_config v2
On Thu, 2010-03-25 at 14:30 -0300, Ricardo Marin Matinata wrote:> This fix enables the persistance of empty configuration files during firstboot, in ovirt_store_config, so configuration files like ssh/ssl keys that are dynamically generated (i.e. content is not known until the node has booted at least one time) to well known locations can be pre set for persistance. > > Signed-off-by: Ricardo Marin Matinata <matinata at br.ibm.com> > --- > scripts/ovirt-functions | 6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions > index 482441a..1c3336d 100644 > --- a/scripts/ovirt-functions > +++ b/scripts/ovirt-functions > @@ -495,9 +495,9 @@ ovirt_store_config() { > fi > > if $persist_it; then > - # skip if file does not exist or is empty > - if [ ! -s "${filename}" ]; then > - printf " Skipping, file '${filename}' does not exist or is empty\n" > + # skip if file does not exist > + if [ ! -e "${filename}" ]; then > + printf " Skipping, file '${filename}' does not exist\n" > continue > fi > # skip if already bind-mountedWas this pushed in (I can't find it in the logs) ? If not, are there any impediments left ? Thanks ! -- Ricardo Marin Matinata Linux Technology Center IBM Brazil | Hortolandia | SP matinata br ibm com
Apparently Analagous Threads
- [PATCH] Allow persistance of empty config files in ovirt_store_config
- [PATCH] Make configure_from_network function check if network is up, before touching it
- [PATCH] Ensures that persist and unpersist work with relative paths.
- RFC: Advanced Storage Configuration
- [PATCH node] save all not-parsed boot parameters