lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 7583624 7/9: Extract marked blocks into sub-s


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 7583624 7/9: Extract marked blocks into sub-scripts #02
Date: Wed, 20 May 2020 18:14:05 -0400 (EDT)

branch: master
commit 7583624093444afce7f18fbfa783d21a765e4fed
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Extract marked blocks into sub-scripts #02
---
 install_centos.sh |  8 ++------
 install_redhat.sh |  8 ++------
 lmi_setup_02.sh   | 35 +++++++++++++++++++++++++++++++++++
 lmi_setup_02c.sh  | 35 +++++++++++++++++++++++++++++++++++
 4 files changed, 74 insertions(+), 12 deletions(-)

diff --git a/install_centos.sh b/install_centos.sh
index 28bc296..f683bf3 100755
--- a/install_centos.sh
+++ b/install_centos.sh
@@ -34,6 +34,7 @@ else
   GIT_URL_BASE=https://github.com/vadz/lmi/raw/master
 fi
 
+wget -N -nv "${GIT_URL_BASE}"/lmi_setup_02c.sh
 wget -N -nv "${GIT_URL_BASE}"/lmi_setup_10.sh
 wget -N -nv "${GIT_URL_BASE}"/lmi_setup_11.sh
 wget -N -nv "${GIT_URL_BASE}"/lmi_setup_20.sh
@@ -85,12 +86,7 @@ set +v
 EOF
 chmod 0666 /tmp/schroot_env
 
-# BEGIN ./lmi_setup_02.sh
-# First, destroy any chroot left by a prior run.
-grep centos /proc/mounts | cut -f2 -d" " | xargs --no-run-if-empty umount
-rm -rf /srv/chroot/centos7lmi
-rm /etc/schroot/chroot.d/centos7lmi.conf
-# END   ./lmi_setup_02.sh
+./lmi_setup_02c.sh
 
 set -evx
 
diff --git a/install_redhat.sh b/install_redhat.sh
index cd7f9e8..64a3982 100755
--- a/install_redhat.sh
+++ b/install_redhat.sh
@@ -34,6 +34,7 @@ else
   GIT_URL_BASE=https://github.com/vadz/lmi/raw/master
 fi
 
+wget -N -nv "${GIT_URL_BASE}"/lmi_setup_02.sh
 wget -N -nv "${GIT_URL_BASE}"/lmi_setup_10.sh
 wget -N -nv "${GIT_URL_BASE}"/lmi_setup_11.sh
 wget -N -nv "${GIT_URL_BASE}"/lmi_setup_20.sh
@@ -82,12 +83,7 @@ set +v
 EOF
 chmod 0666 /tmp/schroot_env
 
-# BEGIN ./lmi_setup_02.sh
-# First, destroy any chroot left by a prior run.
-grep "${CHRTNAME}" /proc/mounts | cut -f2 -d" " | xargs --no-run-if-empty 
umount
-rm -rf /srv/chroot/"${CHRTNAME}"
-rm /etc/schroot/chroot.d/"${CHRTNAME}".conf || echo "None?"
-# END   ./lmi_setup_02.sh
+./lmi_setup_02.sh
 
 # BEGIN ./lmi_setup_05.sh
 umount /srv/chroot
diff --git a/lmi_setup_02.sh b/lmi_setup_02.sh
new file mode 100755
index 0000000..48aede9
--- /dev/null
+++ b/lmi_setup_02.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# Create a chroot for cross-building "Let me illustrate...".
+#
+# Copyright (C) 2016, 2017, 2018, 2019, 2020 Gregory W. Chicares.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+#
+# http://savannah.nongnu.org/projects/lmi
+# email: <address@hidden>
+# snail: Chicares, 186 Belle Woods Drive, Glastonbury CT 06033, USA
+
+. ./lmi_setup_inc.sh
+. /tmp/schroot_env
+
+set -vx
+
+assert_su
+assert_not_chrooted
+
+# First, destroy any chroot left by a prior run.
+grep "${CHRTNAME}" /proc/mounts | cut -f2 -d" " | xargs --no-run-if-empty 
umount
+rm -rf /srv/chroot/"${CHRTNAME}"
+rm /etc/schroot/chroot.d/"${CHRTNAME}".conf || echo "None?"
diff --git a/lmi_setup_02c.sh b/lmi_setup_02c.sh
new file mode 100755
index 0000000..24762f1
--- /dev/null
+++ b/lmi_setup_02c.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# Create a chroot for cross-building "Let me illustrate...".
+#
+# Copyright (C) 2016, 2017, 2018, 2019, 2020 Gregory W. Chicares.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+#
+# http://savannah.nongnu.org/projects/lmi
+# email: <address@hidden>
+# snail: Chicares, 186 Belle Woods Drive, Glastonbury CT 06033, USA
+
+. ./lmi_setup_inc.sh
+. /tmp/schroot_env
+
+set -vx
+
+assert_su
+assert_not_chrooted
+
+# First, destroy any chroot left by a prior run.
+grep centos /proc/mounts | cut -f2 -d" " | xargs --no-run-if-empty umount
+rm -rf /srv/chroot/centos7lmi
+rm /etc/schroot/chroot.d/centos7lmi.conf



reply via email to

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