lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 0331fca 12/12: Configure 'wine' for each user


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 0331fca 12/12: Configure 'wine' for each user
Date: Thu, 11 Jun 2020 20:58:34 -0400 (EDT)

branch: master
commit 0331fcae244bfe5592f26d7fc1871f0e048e7403
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Configure 'wine' for each user
---
 lmi_setup_01.sh  |  5 ++++-
 lmi_setup_01c.sh |  5 ++++-
 lmi_setup_01r.sh |  5 ++++-
 lmi_setup_40.sh  | 16 +++++++++-------
 4 files changed, 21 insertions(+), 10 deletions(-)

diff --git a/lmi_setup_01.sh b/lmi_setup_01.sh
index ce3d7b5..44b8f47 100755
--- a/lmi_setup_01.sh
+++ b/lmi_setup_01.sh
@@ -55,7 +55,10 @@ if sudo -l true; then
 else
   su                                "${NORMAL_USER}"                  
./lmi_setup_30.sh
 fi
-schroot --chroot=${CHRTNAME} --user="${NORMAL_USER}" --directory=/tmp 
./lmi_setup_40.sh
+for user in $(echo "${CHROOT_USERS}" | tr ',' '\n'); do
+{
+schroot --chroot=${CHRTNAME} --user="${user}"        --directory=/tmp 
./lmi_setup_40.sh
+} done
 schroot --chroot=${CHRTNAME} --user="${NORMAL_USER}" --directory=/tmp 
./lmi_setup_42.sh
 schroot --chroot=${CHRTNAME} --user="${NORMAL_USER}" --directory=/tmp 
./lmi_setup_43.sh
 
diff --git a/lmi_setup_01c.sh b/lmi_setup_01c.sh
index f330e98..55606bf 100755
--- a/lmi_setup_01c.sh
+++ b/lmi_setup_01c.sh
@@ -64,7 +64,10 @@ if sudo -l true; then
 else
   su                                "${NORMAL_USER}"                  
./lmi_setup_30.sh
 fi
-schroot --chroot=${CHRTNAME} --user="${NORMAL_USER}" --directory=/tmp 
./lmi_setup_40.sh
+for user in $(echo "${CHROOT_USERS}" | tr ',' '\n'); do
+{
+schroot --chroot=${CHRTNAME} --user="${user}"        --directory=/tmp 
./lmi_setup_40.sh
+} done
 schroot --chroot=${CHRTNAME} --user="${NORMAL_USER}" --directory=/tmp 
./lmi_setup_42.sh
 schroot --chroot=${CHRTNAME} --user="${NORMAL_USER}" --directory=/tmp 
./lmi_setup_43.sh
 
diff --git a/lmi_setup_01r.sh b/lmi_setup_01r.sh
index aa41232..9367aaf 100755
--- a/lmi_setup_01r.sh
+++ b/lmi_setup_01r.sh
@@ -58,7 +58,10 @@ if sudo -l true; then
 else
   su                                "${NORMAL_USER}"                  
./lmi_setup_30.sh
 fi
-schroot --chroot=${CHRTNAME} --user="${NORMAL_USER}" --directory=/tmp 
./lmi_setup_40.sh
+for user in $(echo "${CHROOT_USERS}" | tr ',' '\n'); do
+{
+schroot --chroot=${CHRTNAME} --user="${user}"        --directory=/tmp 
./lmi_setup_40.sh
+} done
 schroot --chroot=${CHRTNAME} --user="${NORMAL_USER}" --directory=/tmp 
./lmi_setup_42.sh
 schroot --chroot=${CHRTNAME} --user="${NORMAL_USER}" --directory=/tmp 
./lmi_setup_43.sh
 
diff --git a/lmi_setup_40.sh b/lmi_setup_40.sh
index 7886fde..6f3e124 100755
--- a/lmi_setup_40.sh
+++ b/lmi_setup_40.sh
@@ -61,6 +61,8 @@ wine regedit
 #     (the other options don't seem to matter)
 #   then restart the application
 
+user=$(whoami)
+
 # Symlink directories used by lmi, so that both native and wine
 # builds use the same directories and can share the same
 # architecture-independent 'configurable_settings.xml'--much like the
@@ -73,17 +75,17 @@ wine regedit
 #   /etc/opt/lmi/ becomes ../../../../../../../../etc/opt/lmi
 #   /var/opt/lmi/ becomes ../../../../../../../../var/opt/lmi
 
-mkdir -p ~/.wine/drive_c/users/"${NORMAL_USER}"/opt/
-cd ~/.wine/drive_c/users/"${NORMAL_USER}"/opt/ || { printf 'failed: cd\n'; 
exit 3; }
+mkdir -p ~/.wine/drive_c/users/"${user}"/opt/
+cd ~/.wine/drive_c/users/"${user}"/opt/ || { printf 'failed: cd\n'; exit 3; }
 ln --symbolic --relative --force --no-dereference /opt/lmi/ ./lmi
 
-mkdir -p ~/.wine/drive_c/users/"${NORMAL_USER}"/etc/opt/
-cd ~/.wine/drive_c/users/"${NORMAL_USER}"/etc/opt/ || { printf 'failed: cd\n'; 
exit 3; }
+mkdir -p ~/.wine/drive_c/users/"${user}"/etc/opt/
+cd ~/.wine/drive_c/users/"${user}"/etc/opt/ || { printf 'failed: cd\n'; exit 
3; }
 ln --symbolic --relative --force --no-dereference /etc/opt/lmi/ ./lmi
 
-mkdir -p ~/.wine/drive_c/users/"${NORMAL_USER}"/var/opt/
-cd ~/.wine/drive_c/users/"${NORMAL_USER}"/var/opt/ || { printf 'failed: cd\n'; 
exit 3; }
+mkdir -p ~/.wine/drive_c/users/"${user}"/var/opt/
+cd ~/.wine/drive_c/users/"${user}"/var/opt/ || { printf 'failed: cd\n'; exit 
3; }
 ln --symbolic --relative --force --no-dereference /var/opt/lmi/ ./lmi
 
 stamp=$(date -u +'%Y%m%dT%H%M%SZ')
-echo "$stamp $0: Configured 'wine' for '$NORMAL_USER'."  | tee /dev/tty
+echo "$stamp $0: Configured 'wine' for user '$user'."  | tee /dev/tty



reply via email to

[Prev in Thread] Current Thread [Next in Thread]