Ricardo Marin Matinata
2010-Mar-24  22:16 UTC
[Ovirt-devel] [PATCH] Allow persistance of empty config files in ovirt_store_config
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 to well known locations can be pre set for persistance.
Signed-off-by: Ricardo Marin Matinata <matinata at br.ibm.com>
---
 scripts/ovirt-functions |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions
index 482441a..cecb359 100644
--- a/scripts/ovirt-functions
+++ b/scripts/ovirt-functions
@@ -496,7 +496,7 @@ ovirt_store_config() {
 
             if $persist_it; then
                 # skip if file does not exist or is empty
-                if [ ! -s "${filename}" ]; then
+                if [ ! -e "${filename}" ]; then
                     printf " Skipping, file '${filename}' does not
exist or is empty\n"
                     continue
                 fi
-- 
1.6.6.1
Darryl L. Pierce
2010-Mar-25  12:41 UTC
[Ovirt-devel] [PATCH] Allow persistance of empty config files in ovirt_store_config
On Wed, Mar 24, 2010 at 07:16:49PM -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 to well known locations can be pre set for persistance. > > Signed-off-by: Ricardo Marin Matinata <matinata at br.ibm.com> > --- > scripts/ovirt-functions | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions > index 482441a..cecb359 100644 > --- a/scripts/ovirt-functions > +++ b/scripts/ovirt-functions > @@ -496,7 +496,7 @@ ovirt_store_config() { > > if $persist_it; then > # skip if file does not exist or is empty > - if [ ! -s "${filename}" ]; then > + if [ ! -e "${filename}" ]; then > printf " Skipping, file '${filename}' does not exist or is empty\n" > continue > fi > -- > 1.6.6.1 > > _______________________________________________ > Ovirt-devel mailing list > Ovirt-devel at redhat.com > https://www.redhat.com/mailman/listinfo/ovirt-develACK - I'll push this upstream. Thank you. :) -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Delivering value year after year. Red Hat ranks #1 in value among software vendors. http://www.redhat.com/promo/vendor/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: not available URL: <http://listman.redhat.com/archives/ovirt-devel/attachments/20100325/d5eba3ab/attachment.sig>
Reasonably Related Threads
- [PATCH] Allow persistance of empty config files in ovirt_store_config v2
- [PATCH] Make configure_from_network function check if network is up, before touching it
- [PATCH] Ensures that persist and unpersist work with relative paths.
- [PATCH] Fixed unpersisting directories and persisting directories that contain persisted files.
- Resend of one patch, new to follow on...