[Ovirt-devel] [PATCH ovirt-node-image] alias vi to vi + restorecon

Darryl L. Pierce dpierce at redhat.com
Thu Jul 23 13:29:09 UTC 2009


On Wed, Jul 22, 2009 at 05:17:11PM -0400, David Huff wrote:
> fixes a problem with editing a bindmounted file with vi.  The file will not
> retain the same selinux context due to the way vi copies files around.
> 
> Resolves rhbz#509082
> ---
>  common-post.ks |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/common-post.ks b/common-post.ks
> index 8a4940a..c85be15 100644
> --- a/common-post.ks
> +++ b/common-post.ks
> @@ -131,6 +131,11 @@ sed -i 's/node\.session\.initial_login_retry_max.*/node.session.initial_login_re
>  # root's bash profile
>  cat >> /root/.bashrc <<EOF
>  # aliases used for the temporary
> +function mod_vi() {
> +  vi $@
> +  restorecon -v $@
> +}
> +alias vi="mod_vi"
>  alias ping='ping -c 3'
>  EOF
>  
> -- 
> 1.6.0.6
> 
> _______________________________________________
> Ovirt-devel mailing list
> Ovirt-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/ovirt-devel

ACK.

-- 
Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc.
Virtual Machine Management - http://www.ovirt.org/
Is fearr Gaeilge bhriste ná Béarla cliste.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/ovirt-devel/attachments/20090723/c1ef4c37/attachment.sig>


More information about the ovirt-devel mailing list