From 8ab1ade42ed3b4d4bda00c3dc5a6110c05c201e4 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Fri, 7 Oct 2011 21:03:16 -0400 Subject: [PATCH] instead of 'newgrp' and a pipe, use 'sg' sg and newgrp basically do the same thing, but sg takes a command to execute rather than just executing sh. This just seems cleaner. --- stack.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/stack.sh b/stack.sh index 5f13671..516c920 100755 --- a/stack.sh +++ b/stack.sh @@ -592,9 +592,8 @@ fi # have to do a little more than that in our script. Since we add the group # ``libvirtd`` to our user in this script, when nova-compute is run it is # within the context of our original shell (so our groups won't be updated). -# We can send the command nova-compute to the ``newgrp`` command to execute -# in a specific context. -screen_it n-cpu "cd $NOVA_DIR && echo $NOVA_DIR/bin/nova-compute | newgrp libvirtd" +# Use 'sg' to execute nova-compute as a member of the libvirtd group. +screen_it n-cpu "cd $NOVA_DIR && sg libvirtd $NOVA_DIR/bin/nova-compute" screen_it n-net "cd $NOVA_DIR && $NOVA_DIR/bin/nova-network" screen_it n-sch "cd $NOVA_DIR && $NOVA_DIR/bin/nova-scheduler" screen_it n-vnc "cd $NOVNC_DIR && ./utils/nova-wsproxy.py 6080 --web . --flagfile=../nova/bin/nova.conf"