Perry Myers
2009-Jan-30 00:50 UTC
[Ovirt-devel] [PATCH node-image] Only lock root account for production builds. For non-release builds leave it open
This makes it easier for developers to do work Signed-off-by: Perry Myers <pmyers at redhat.com> --- common-post.ks | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/common-post.ks b/common-post.ks index ffc459c..08dd6c0 100644 --- a/common-post.ks +++ b/common-post.ks @@ -87,6 +87,9 @@ sed -i '/rm -f \/etc\/localtime/d' $DHSCRIPT sed -i '/rm -f \/etc\/ntp.conf/d' $DHSCRIPT sed -i '/rm -f \/etc\/yp.conf/d' $DHSCRIPT -# By default, lock the root account. It is only unlocked after the -# root password is set in the ovirt-config-password script. -passwd -l root +if rpm -q --qf '%{release}' ovirt-node | grep "0\..*" > /dev/null 2>&1 ; then + echo "Building in developer mode, leaving root account unlocked" +else + echo "Building in production mode, locking root account" + passwd -l root +fi -- 1.6.0.6
Jeremy Katz
2009-Jan-30 01:09 UTC
[Ovirt-devel] [PATCH node-image] Only lock root account for production builds. For non-release builds leave it open
On Jan 29, 2009, at 7:50 PM, Perry Myers <pmyers at redhat.com> wrote:> This makes it easier for developers to do workThis looks pretty fragile as the version of a -release package changes over time. Why not instead have it be more explicit as to whether or not the image is "devel" mode and then key off of that either with different snippets or based on something that's actually set in the image Jeremy
Perry Myers
2009-Jan-30 01:14 UTC
[Ovirt-devel] Re: [PATCH node-image] Only lock root account for production builds. For non-release builds leave it open
Perry Myers wrote:> This makes it easier for developers to do work > > Signed-off-by: Perry Myers <pmyers at redhat.com> > --- > common-post.ks | 9 ++++++--- > 1 files changed, 6 insertions(+), 3 deletions(-) > > diff --git a/common-post.ks b/common-post.ks > index ffc459c..08dd6c0 100644 > --- a/common-post.ks > +++ b/common-post.ks > @@ -87,6 +87,9 @@ sed -i '/rm -f \/etc\/localtime/d' $DHSCRIPT > sed -i '/rm -f \/etc\/ntp.conf/d' $DHSCRIPT > sed -i '/rm -f \/etc\/yp.conf/d' $DHSCRIPT > > -# By default, lock the root account. It is only unlocked after the > -# root password is set in the ovirt-config-password script. > -passwd -l root > +if rpm -q --qf '%{release}' ovirt-node | grep "0\..*" > /dev/null 2>&1 ; then > + echo "Building in developer mode, leaving root account unlocked" > +else > + echo "Building in production mode, locking root account" > + passwd -l root > +fiThis was acked by Alan and pushed with caveats that I change the grep to be: grep -q "^0\." Perry -- |=- Red Hat, Engineering, Emerging Technologies, Boston -=| |=- Email: pmyers at redhat.com -=| |=- Office: +1 412 474 3552 Mobile: +1 703 362 9622 -=| |=- GnuPG: E65E4F3D 88F9 F1C9 C2F3 1303 01FE 817C C5D2 8B91 E65E 4F3D -=|