lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master e2739a10 1/2: Allow 'tee /dev/tty' to fail


From: Greg Chicares
Subject: [lmi-commits] [lmi] master e2739a10 1/2: Allow 'tee /dev/tty' to fail
Date: Wed, 18 Jan 2023 19:37:11 -0500 (EST)

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

    Allow 'tee /dev/tty' to fail
    
    Building lmi on a corporate server has become difficult because the
    corporate VPN often disconnects, sending a hangup signal to the server
    even if the VPN automatically reconnects immediately. Building with:
      nohup gwc/redhat_rebuild.sh & disown
    would seem to work, except that /dev/tty no longer exists when the
    terminal is closed or disconnected, causing writes to that nonexistent
    device to fail.
    
    No more elaborate method seems warranted. The intention is only to
    write occasional messages to the terminal when the output of that
    long-running script has been redirected, when it's run on a personal
    workstation. On this corporate server, that's just not feasible.
---
 lmi_setup_00.sh  | 4 ++--
 lmi_setup_00c.sh | 2 +-
 lmi_setup_01.sh  | 2 +-
 lmi_setup_01c.sh | 2 +-
 lmi_setup_01r.sh | 2 +-
 lmi_setup_02.sh  | 2 +-
 lmi_setup_02c.sh | 2 +-
 lmi_setup_05c.sh | 2 +-
 lmi_setup_05r.sh | 2 +-
 lmi_setup_07r.sh | 2 +-
 lmi_setup_10.sh  | 2 +-
 lmi_setup_10c.sh | 2 +-
 lmi_setup_10r.sh | 2 +-
 lmi_setup_11.sh  | 2 +-
 lmi_setup_20.sh  | 2 +-
 lmi_setup_21.sh  | 2 +-
 lmi_setup_24.sh  | 2 +-
 lmi_setup_24c.sh | 2 +-
 lmi_setup_25.sh  | 2 +-
 lmi_setup_29.sh  | 2 +-
 lmi_setup_30.sh  | 2 +-
 lmi_setup_40.sh  | 2 +-
 lmi_setup_42.sh  | 2 +-
 lmi_setup_43.sh  | 2 +-
 lmi_setup_44.sh  | 2 +-
 25 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/lmi_setup_00.sh b/lmi_setup_00.sh
index 454e3e2b..1c5f058c 100755
--- a/lmi_setup_00.sh
+++ b/lmi_setup_00.sh
@@ -177,5 +177,5 @@ seconds=$(($(date -u '+%s' -d "$stamp1") - $(date -u '+%s' 
-d "$stamp0")))
 elapsed=$(date -u -d @"$seconds" +'%H:%M:%S')
 
 stamp=$(date -u +'%Y%m%dT%H%M%SZ')
-echo "$stamp $0 Installed and tested lmi."    | tee /dev/tty
-echo "Elapsed: $elapsed; log suffix: $fstamp" | tee /dev/tty
+echo "$stamp $0 Installed and tested lmi."    | tee /dev/tty || true
+echo "Elapsed: $elapsed; log suffix: $fstamp" | tee /dev/tty || true
diff --git a/lmi_setup_00c.sh b/lmi_setup_00c.sh
index a07b55b8..888f30df 100755
--- a/lmi_setup_00c.sh
+++ b/lmi_setup_00c.sh
@@ -116,4 +116,4 @@ cp -a install_msw.sh   /srv/chroot/centos7lmi/tmp
 schroot --chroot=centos7lmi --user=root --directory=/tmp ./lmi_setup_01c.sh
 
 stamp=$(date -u +'%Y%m%dT%H%M%SZ')
-echo "$stamp $0 Installed in centos chroot."  | tee /dev/tty
+echo "$stamp $0 Installed in centos chroot." | tee /dev/tty || true
diff --git a/lmi_setup_01.sh b/lmi_setup_01.sh
index d975dfde..a3c787e6 100755
--- a/lmi_setup_01.sh
+++ b/lmi_setup_01.sh
@@ -64,4 +64,4 @@ schroot --chroot="${CHRTNAME}" --user="${NORMAL_USER}" 
--directory=/tmp ./lmi_se
 schroot --chroot="${CHRTNAME}" --user=nemo             --directory=/tmp 
./lmi_setup_44.sh
 
 stamp=$(date -u +'%Y%m%dT%H%M%SZ')
-echo "$stamp $0 [debian host]"  | tee /dev/tty
+echo "$stamp $0 [debian host]" | tee /dev/tty || true
diff --git a/lmi_setup_01c.sh b/lmi_setup_01c.sh
index c45784f3..8c338231 100755
--- a/lmi_setup_01c.sh
+++ b/lmi_setup_01c.sh
@@ -73,4 +73,4 @@ schroot --chroot="${CHRTNAME}" --user="${NORMAL_USER}" 
--directory=/tmp ./lmi_se
 schroot --chroot="${CHRTNAME}" --user=nemo             --directory=/tmp 
./lmi_setup_44.sh
 
 stamp=$(date -u +'%Y%m%dT%H%M%SZ')
-echo "$stamp $0 [centos host]"  | tee /dev/tty
+echo "$stamp $0 [centos host]" | tee /dev/tty || true
diff --git a/lmi_setup_01r.sh b/lmi_setup_01r.sh
index a74e812f..62620468 100755
--- a/lmi_setup_01r.sh
+++ b/lmi_setup_01r.sh
@@ -72,4 +72,4 @@ schroot --chroot="${CHRTNAME}" --user="${NORMAL_USER}" 
--directory=/tmp ./lmi_se
 schroot --chroot="${CHRTNAME}" --user="${NORMAL_USER}" --directory=/tmp 
./lmi_setup_44.sh
 
 stamp=$(date -u +'%Y%m%dT%H%M%SZ')
-echo "$stamp $0 [redhat host]"  | tee /dev/tty
+echo "$stamp $0 [redhat host]" | tee /dev/tty || true
diff --git a/lmi_setup_02.sh b/lmi_setup_02.sh
index 1be1c8fd..979d3ae8 100755
--- a/lmi_setup_02.sh
+++ b/lmi_setup_02.sh
@@ -114,5 +114,5 @@ if [ -e "${loc0}" ] || [ -e "${loc1}" ] ; then echo 
"Oops."; exit 9; fi
 rm --force /etc/schroot/chroot.d/"${CHRTNAME}".conf
 
 stamp=$(date -u +'%Y%m%dT%H%M%SZ')
-echo "$stamp $0: Removed old '${CHRTNAME}' chroot."  | tee /dev/tty
+echo "$stamp $0: Removed old '${CHRTNAME}' chroot." | tee /dev/tty || true
 
diff --git a/lmi_setup_02c.sh b/lmi_setup_02c.sh
index dc85fc93..cb56ce39 100755
--- a/lmi_setup_02c.sh
+++ b/lmi_setup_02c.sh
@@ -58,4 +58,4 @@ if [ -e "${loc0}" ] || [ -e "${loc1}" ] ; then echo "Oops."; 
exit 9; fi
 rm --force /etc/schroot/chroot.d/centos7lmi.conf
 
 stamp=$(date -u +'%Y%m%dT%H%M%SZ')
-echo "$stamp $0: Removed old centos chroot."  | tee /dev/tty
+echo "$stamp $0: Removed old centos chroot." | tee /dev/tty || true
diff --git a/lmi_setup_05c.sh b/lmi_setup_05c.sh
index aac4996c..5e9fbd15 100755
--- a/lmi_setup_05c.sh
+++ b/lmi_setup_05c.sh
@@ -58,4 +58,4 @@ yum --assumeyes install git less ncurses-term sudo vim zsh
 chsh -s /bin/zsh root
 
 stamp=$(date -u +'%Y%m%dT%H%M%SZ')
-echo "$stamp $0: Reconfigured centos chroot."  | tee /dev/tty
+echo "$stamp $0: Reconfigured centos chroot." | tee /dev/tty || true
diff --git a/lmi_setup_05r.sh b/lmi_setup_05r.sh
index cf81e7c3..dd0619dd 100755
--- a/lmi_setup_05r.sh
+++ b/lmi_setup_05r.sh
@@ -67,4 +67,4 @@ assert_not_chrooted
 findmnt /srv
 
 stamp=$(date -u +'%Y%m%dT%H%M%SZ')
-echo "$stamp $0: Reconfigured redhat chroot."  | tee /dev/tty
+echo "$stamp $0: Reconfigured redhat chroot." | tee /dev/tty || true
diff --git a/lmi_setup_07r.sh b/lmi_setup_07r.sh
index 3212af73..dd17e232 100755
--- a/lmi_setup_07r.sh
+++ b/lmi_setup_07r.sh
@@ -60,4 +60,4 @@ subscription-manager repos --enable "rhel-*-optional-rpms" 
--enable "rhel-*-extr
 yum --assumeyes install epel-release
 
 stamp=$(date -u +'%Y%m%dT%H%M%SZ')
-echo "$stamp $0: Installed EPEL."  | tee /dev/tty
+echo "$stamp $0: Installed EPEL." | tee /dev/tty || true
diff --git a/lmi_setup_10.sh b/lmi_setup_10.sh
index dd40cde1..0c57da65 100755
--- a/lmi_setup_10.sh
+++ b/lmi_setup_10.sh
@@ -37,4 +37,4 @@ apt-get --assume-yes install debootstrap schroot
 #   ls /usr/share/debootstrap/scripts
 
 stamp=$(date -u +'%Y%m%dT%H%M%SZ')
-echo "$stamp $0: Installed 'debootstrap' [debian]."  | tee /dev/tty
+echo "$stamp $0: Installed 'debootstrap' [debian]." | tee /dev/tty || true
diff --git a/lmi_setup_10c.sh b/lmi_setup_10c.sh
index 4f004907..8049fbe0 100755
--- a/lmi_setup_10c.sh
+++ b/lmi_setup_10c.sh
@@ -34,4 +34,4 @@ apt-get update
 apt-get --assume-yes install rinse schroot
 
 stamp=$(date -u +'%Y%m%dT%H%M%SZ')
-echo "$stamp $0: Installed 'rinse' [centos]."  | tee /dev/tty
+echo "$stamp $0: Installed 'rinse' [centos]." | tee /dev/tty || true
diff --git a/lmi_setup_10r.sh b/lmi_setup_10r.sh
index 0635c917..3fb01110 100755
--- a/lmi_setup_10r.sh
+++ b/lmi_setup_10r.sh
@@ -36,4 +36,4 @@ yum --assumeyes install debootstrap schroot
 #   ls /usr/share/debootstrap/scripts
 
 stamp=$(date -u +'%Y%m%dT%H%M%SZ')
-echo "$stamp $0: Installed 'debootstrap' [redhat]."  | tee /dev/tty
+echo "$stamp $0: Installed 'debootstrap' [redhat]." | tee /dev/tty || true
diff --git a/lmi_setup_11.sh b/lmi_setup_11.sh
index 37105d09..da04da80 100755
--- a/lmi_setup_11.sh
+++ b/lmi_setup_11.sh
@@ -138,4 +138,4 @@ du   -sb /srv/chroot/"${CHRTNAME}"/var/cache/apt/archives
 cp -a /etc/hosts /etc/nsswitch.conf /srv/chroot/"${CHRTNAME}"/etc
 
 stamp=$(date -u +'%Y%m%dT%H%M%SZ')
-echo "$stamp $0: Ran 'debootstrap'; configured networking."  | tee /dev/tty
+echo "$stamp $0: Ran 'debootstrap'; configured networking." | tee /dev/tty || 
true
diff --git a/lmi_setup_20.sh b/lmi_setup_20.sh
index 3e676084..c212a833 100755
--- a/lmi_setup_20.sh
+++ b/lmi_setup_20.sh
@@ -158,4 +158,4 @@ apt-get --assume-yes install \
 #   Not creating home directory `/run/uuidd'.
 
 stamp=$(date -u +'%Y%m%dT%H%M%SZ')
-echo "$stamp $0: Installed debian packages."  | tee /dev/tty
+echo "$stamp $0: Installed debian packages." | tee /dev/tty || true
diff --git a/lmi_setup_21.sh b/lmi_setup_21.sh
index 3c0f2b0c..3b9f4059 100755
--- a/lmi_setup_21.sh
+++ b/lmi_setup_21.sh
@@ -70,4 +70,4 @@ apt-get --assume-yes update
 apt-get --assume-yes dist-upgrade
 
 stamp=$(date -u +'%Y%m%dT%H%M%SZ')
-echo "$stamp $0: Updated debian chroot."  | tee /dev/tty
+echo "$stamp $0: Updated debian chroot." | tee /dev/tty || true
diff --git a/lmi_setup_24.sh b/lmi_setup_24.sh
index f574df0f..d2bae647 100755
--- a/lmi_setup_24.sh
+++ b/lmi_setup_24.sh
@@ -83,4 +83,4 @@ do
 } done
 
 stamp=$(date -u +'%Y%m%dT%H%M%SZ')
-echo "$stamp $0: Configured users."  | tee /dev/tty
+echo "$stamp $0: Configured users." | tee /dev/tty || true
diff --git a/lmi_setup_24c.sh b/lmi_setup_24c.sh
index 9a16fdd2..592c740d 100755
--- a/lmi_setup_24c.sh
+++ b/lmi_setup_24c.sh
@@ -97,4 +97,4 @@ do
 } done
 
 stamp=$(date -u +'%Y%m%dT%H%M%SZ')
-echo "$stamp $0: Configured users."  | tee /dev/tty
+echo "$stamp $0: Configured users." | tee /dev/tty || true
diff --git a/lmi_setup_25.sh b/lmi_setup_25.sh
index a9ce8cd3..d34d0182 100755
--- a/lmi_setup_25.sh
+++ b/lmi_setup_25.sh
@@ -85,4 +85,4 @@ case "$(git --version)" in
 esac
 
 stamp=$(date -u +'%Y%m%dT%H%M%SZ')
-echo "$stamp $0: Configured {zsh,vim,git} for user '$(whoami)'."  | tee 
/dev/tty
+echo "$stamp $0: Configured {zsh,vim,git} for user '$(whoami)'." | tee 
/dev/tty || true
diff --git a/lmi_setup_29.sh b/lmi_setup_29.sh
index 13781380..f8637a85 100755
--- a/lmi_setup_29.sh
+++ b/lmi_setup_29.sh
@@ -58,4 +58,4 @@ find /srv/cache_for_lmi/blessed -type d -exec chmod g+s {} +
 chmod -R g=u /srv/cache_for_lmi/blessed
 
 stamp=$(date -u +'%Y%m%dT%H%M%SZ')
-echo "$stamp $0: Created lmi directories; adjusted git."  | tee /dev/tty
+echo "$stamp $0: Created lmi directories; adjusted git." | tee /dev/tty || true
diff --git a/lmi_setup_30.sh b/lmi_setup_30.sh
index e9ba704d..8c4777b7 100755
--- a/lmi_setup_30.sh
+++ b/lmi_setup_30.sh
@@ -84,4 +84,4 @@ cp -a ~/.ssh/ /srv/chroot/"${CHRTNAME}"/home/"${NORMAL_USER}" 
|| true
 #   https://lists.nongnu.org/archive/html/lmi/2018-01/msg00003.html
 
 stamp=$(date -u +'%Y%m%dT%H%M%SZ')
-echo "$stamp $0: Copied optional files."  | tee /dev/tty
+echo "$stamp $0: Copied optional files." | tee /dev/tty || true
diff --git a/lmi_setup_40.sh b/lmi_setup_40.sh
index f5bfdc34..7516d3ce 100755
--- a/lmi_setup_40.sh
+++ b/lmi_setup_40.sh
@@ -119,4 +119,4 @@ 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 user '$user'."  | tee /dev/tty
+echo "$stamp $0: Configured 'wine' for user '$user'." | tee /dev/tty || true
diff --git a/lmi_setup_42.sh b/lmi_setup_42.sh
index a662c33e..b2f666cd 100755
--- a/lmi_setup_42.sh
+++ b/lmi_setup_42.sh
@@ -50,4 +50,4 @@ mkdir -p "${logdir}"
 # wine ./lmi_wx_shared.exe --ash_nazg --data_path=../data
 
 stamp=$(date -u +'%Y%m%dT%H%M%SZ')
-echo "$stamp $0: Installed lmi for '$NORMAL_USER'."  | tee /dev/tty
+echo "$stamp $0: Installed lmi for '$NORMAL_USER'." | tee /dev/tty || true
diff --git a/lmi_setup_43.sh b/lmi_setup_43.sh
index 3f198eaa..bbaf7f4f 100755
--- a/lmi_setup_43.sh
+++ b/lmi_setup_43.sh
@@ -138,4 +138,4 @@ find . -path ./.git -prune -o -type f -print0 \
   | xargs --null --max-procs="$(nproc)" --replace='{}' touch 
'--reference=/opt/lmi/src/lmi/{}' '{}'
 
 stamp=$(date -u +'%Y%m%dT%H%M%SZ')
-echo "$stamp $0: Ran system test for '$(whoami)'."  | tee /dev/tty
+echo "$stamp $0: Ran system test for '$(whoami)'." | tee /dev/tty || true
diff --git a/lmi_setup_44.sh b/lmi_setup_44.sh
index 64161da4..a676565e 100755
--- a/lmi_setup_44.sh
+++ b/lmi_setup_44.sh
@@ -38,4 +38,4 @@ export WINEDEBUG=-all,err+all,fixme+all
 /opt/lmi/src/lmi/nychthemeral_test.sh || true
 
 stamp=$(date -u +'%Y%m%dT%H%M%SZ')
-echo "$stamp $0: Ran nychthemeral test for '$(whoami)'."  | tee /dev/tty
+echo "$stamp $0: Ran nychthemeral test for '$(whoami)'." | tee /dev/tty || true



reply via email to

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