[Ovirt-devel] [PATCH node] get memory info directly from /proc/meminfo
Darryl L. Pierce
dpierce at redhat.com
Mon Dec 15 16:41:52 UTC 2008
On Mon, Dec 15, 2008 at 04:45:46PM +0100, Alan Pevec wrote:
> to avoid libvirt dependecy and to drop newrole workaround
> for selinux issue with initrc_t
>
> Signed-off-by: Alan Pevec <apevec at redhat.com>
> ---
> scripts/ovirt-config-setup | 2 +-
> scripts/ovirt-config-storage | 3 +--
> scripts/ovirt-firstboot | 2 +-
> 3 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/scripts/ovirt-config-setup b/scripts/ovirt-config-setup
> index 639b7b8..20dd5ae 100755
> --- a/scripts/ovirt-config-setup
> +++ b/scripts/ovirt-config-setup
> @@ -31,7 +31,7 @@ while true; do
> case "$OPTION" in
> "$NETWORK") ovirt-config-networking ; break ;;
> "$STORAGE")
> - newrole -r system_r -t virtd_t -- -c ovirt-config-storage ;
> + ovirt-config-storage ;
> break ;;
> "$LOGGING") ovirt-config-logging ; break ;;
> "$PASSWORD") ovirt-config-password ; break ;;
> diff --git a/scripts/ovirt-config-storage b/scripts/ovirt-config-storage
> index fd877e2..dd3fab1 100755
> --- a/scripts/ovirt-config-storage
> +++ b/scripts/ovirt-config-storage
> @@ -256,8 +256,7 @@ do_confirm()
> done
> }
>
> -MEM_SIZE=$(virsh --readonly -c qemu:///system nodeinfo \
> - | awk '/Memory size/ { print $3 }')
> +MEM_SIZE=$(cat /proc/meminfo | awk '/MemTotal:/ { print $2 }')
> case $MEM_SIZE in
> ''|*[^0-9]*) die failed to get system memory size;;
> esac
> diff --git a/scripts/ovirt-firstboot b/scripts/ovirt-firstboot
> index ba565bf..1f7cf22 100755
> --- a/scripts/ovirt-firstboot
> +++ b/scripts/ovirt-firstboot
> @@ -33,7 +33,7 @@ start ()
>
> if is_auto_install; then
> ovirt-config-networking AUTO
> - newrole -r system_r -t virtd_t -- -c 'ovirt-config-storage AUTO'
> + ovirt-config-storage AUTO
> ovirt-config-logging AUTO
> if [ "$OVIRT_LOCAL_BOOT" = 1 ]; then
> mount_live
> --
> 1.6.0.4
>
> _______________________________________________
> 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/
"What do you care what other people think, Mr. Feynman?"
-------------- 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/20081215/c391a2c9/attachment.sig>
More information about the ovirt-devel
mailing list