Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (75091c855e9cd777ba717fd8e90c5b5b28d4df0a)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Vlad Glagolev <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (75091c855e9cd777ba717fd8e90c5b5b28d4df0a)
  • Date: Sun, 13 May 2012 15:27:14 -0500

GIT changes to master grimoire by Vlad Glagolev <stealth AT sourcemage.org>:

utils/util-linux/CONFIGURE | 30 ++++++++++++++++++++++++++++++
utils/util-linux/FINAL | 11 +----------
utils/util-linux/HISTORY | 3 +++
utils/util-linux/PRE_BUILD | 6 +-----
4 files changed, 35 insertions(+), 15 deletions(-)

New commits:
commit 75091c855e9cd777ba717fd8e90c5b5b28d4df0a
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>

util-linux: properly handle /etc/inittab upgrade

diff --git a/utils/util-linux/CONFIGURE b/utils/util-linux/CONFIGURE
index 3b00f63..1e8f012 100755
--- a/utils/util-linux/CONFIGURE
+++ b/utils/util-linux/CONFIGURE
@@ -1,3 +1,33 @@
+. "$GRIMOIRE/FUNCTIONS" &&
+
+local OLD_SPELL_VERSION="" &&
+spell_ok $SPELL && OLD_SPELL_VERSION="$(installed_version $SPELL)" &&
+
+# util-linux 2.20 needs ttyX in /etc/inittab without /dev
+# http://www.sourcemage.org/issues/110
+message "${MESSAGE_COLOR}Checking sanity of /etc/inittab...${DEFAULT_COLOR}"
&&
+
+if grep -iq "/dev/tty" "$INSTALL_ROOT/etc/inittab"; then
+ if is_version_less ${OLD_SPELL_VERSION} 2.20 && is_version_less 2.19.1
${VERSION}; then
+ message "${PROBLEM_COLOR}" &&
+ message "WARNING: $INSTALL_ROOT/etc/inittab needs syntax update. You
need to" &&
+ message "replace all '/dev/tty*' lines to 'tty*' equivalents, e.g.:" &&
+ message "${MESSAGE_COLOR}Before: tty1:linux:/sbin/agetty /dev/tty1 9600"
&&
+ message "After: tty1:linux:/sbin/agetty tty1 9600${PROBLEM_COLOR}" &&
+ message "Press 'n' to abort cast and do that manually by editing" &&
+ message "$INSTALL_ROOT/etc/inittab file under superuser, then recast
$SPELL." &&
+ message "${DEFAULT_COLOR}" &&
+
+ if ! query "Attempt to replace the lines automatically?" n; then
+ return 1
+ else
+ cp $INSTALL_ROOT/etc/inittab $INSTALL_ROOT/etc/inittab-$(date
+'%Y%m%d%H%M') &&
+ sedit "s:/dev/tty:tty:g" "$INSTALL_ROOT/etc/inittab" &&
+ message "${MESSAGE_COLOR}Updated${DEFAULT_COLOR}"
+ fi
+ fi
+fi &&
+
if [[ ! -e "$INSTALL_ROOT/etc/sysconfig/hwclock" ]]; then
config_query UTC "Should the hardware clock store time in UTC (may break
systems like MS Windows)?" y
fi
diff --git a/utils/util-linux/FINAL b/utils/util-linux/FINAL
index 7ebc168..25efe01 100755
--- a/utils/util-linux/FINAL
+++ b/utils/util-linux/FINAL
@@ -1,14 +1,5 @@
-# util-linux 2.20 needs ttyX in /etc/inittab without /dev
-# http://www.sourcemage.org/issues/110
-if [ "${VERSION:0:4}" == "2.20" ] && [ "${OLD_SPELL_VERSION:0:4}" == "2.19"
]; then
- message "New version of util-linux needs to update /etc/inittab ..." &&
- cp $INSTALL_ROOT/etc/inittab $INSTALL_ROOT/etc/inittab-$(date
+'%Y%m%d%H%M') &&
- sed -i "s:/dev/tty:tty:" $INSTALL_ROOT/etc/inittab &&
- message "Updated"
-fi &&
-
if test -f "$INSTALL_ROOT/etc/sysconfig/hwclock" && [[ $UTC ]]; then
sed -i "s/^UTC=.*$/UTC=$UTC/" "$INSTALL_ROOT/etc/sysconfig/hwclock"
-fi
+fi &&

persistent_remove UTC || true
diff --git a/utils/util-linux/HISTORY b/utils/util-linux/HISTORY
index 35fb0eb..8cdaf26 100644
--- a/utils/util-linux/HISTORY
+++ b/utils/util-linux/HISTORY
@@ -1,3 +1,6 @@
+2012-05-14 Vlad Glagolev <stealth AT sourcemage.org>
+ * CONFIGURE, PRE_BUILD, FINAL: properly handle /etc/inittab upgrade
+
2012-04-14 Vlad Glagolev <stealth AT sourcemage.org>
* DETAILS: unbrake AES version

diff --git a/utils/util-linux/PRE_BUILD b/utils/util-linux/PRE_BUILD
index 56366db..5757181 100755
--- a/utils/util-linux/PRE_BUILD
+++ b/utils/util-linux/PRE_BUILD
@@ -3,8 +3,4 @@ cd "$SOURCE_DIRECTORY" &&

if [[ $UL_VERSION == aes ]]; then
bzcat "$SOURCE_CACHE/$SOURCE3" | patch -p1
-fi &&
-
-# OLD_SPELL_VERSION is needed in FINAL
-local OLD_SPELL_VERSION=""
-spell_ok $SPELL && OLD_SPELL_VERSION="$(installed_version $SPELL)"
+fi



  • [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (75091c855e9cd777ba717fd8e90c5b5b28d4df0a), Vlad Glagolev, 05/13/2012

Archive powered by MHonArc 2.6.24.

Top of Page