Remove DEFAULT_STACK_USER, just use STACK_USER
STACK_USER needs to be set for more than just stack.sh, there
was no real distinction for using DEFAULT_STACK_USER instead
of just setting STACK_USER directly in stackrc and allowing it
to be overridden in localrc.
Change-Id: I9e8d70db29bb421f1ce3dbf40a5ad299cc7ea785
diff --git a/tools/build_ramdisk.sh b/tools/build_ramdisk.sh
index cfcca51..2c45568 100755
--- a/tools/build_ramdisk.sh
+++ b/tools/build_ramdisk.sh
@@ -125,17 +125,17 @@
# Create a stack user that is a member of the libvirtd group so that stack
# is able to interact with libvirt.
chroot $MNTDIR groupadd libvirtd
- chroot $MNTDIR useradd $DEFAULT_STACK_USER -s /bin/bash -d $DEST -G libvirtd
+ chroot $MNTDIR useradd $STACK_USER -s /bin/bash -d $DEST -G libvirtd
mkdir -p $MNTDIR/$DEST
- chroot $MNTDIR chown $DEFAULT_STACK_USER $DEST
+ chroot $MNTDIR chown $STACK_USER $DEST
# A simple password - pass
- echo $DEFAULT_STACK_USER:pass | chroot $MNTDIR chpasswd
+ echo $STACK_USER:pass | chroot $MNTDIR chpasswd
echo root:$ROOT_PASSWORD | chroot $MNTDIR chpasswd
# And has sudo ability (in the future this should be limited to only what
# stack requires)
- echo "$DEFAULT_STACK_USER ALL=(ALL) NOPASSWD: ALL" >> $MNTDIR/etc/sudoers
+ echo "$STACK_USER ALL=(ALL) NOPASSWD: ALL" >> $MNTDIR/etc/sudoers
umount $MNTDIR
rmdir $MNTDIR
@@ -187,7 +187,7 @@
# Use this version of devstack
rm -rf $MNTDIR/$DEST/devstack
cp -pr $CWD $MNTDIR/$DEST/devstack
-chroot $MNTDIR chown -R $DEFAULT_STACK_USER $DEST/devstack
+chroot $MNTDIR chown -R $STACK_USER $DEST/devstack
# Configure host network for DHCP
mkdir -p $MNTDIR/etc/network
@@ -225,7 +225,7 @@
# Make the run.sh executable
chmod 755 $RUN_SH
-chroot $MNTDIR chown $DEFAULT_STACK_USER $DEST/run.sh
+chroot $MNTDIR chown $STACK_USER $DEST/run.sh
umount $MNTDIR
rmdir $MNTDIR