Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/etc Add x11 test to ask user to migrate from /usr/X11R6/lib/...
details: https://anonhg.NetBSD.org/src/rev/135eb209d8ec
branches: trunk
changeset: 566659:135eb209d8ec
user: lukem <lukem%NetBSD.org@localhost>
date: Sun May 16 11:19:28 2004 +0000
description:
Add x11 test to ask user to migrate from /usr/X11R6/lib/X11/<foo> to
/etc/X11/<foo>, where <foo> is one of:
fs lbxproxy proxymngr rstart twm xdm xinit xserver xsm
(I haven't implemented automatic migration at this time; it's too fragile
given that /etc/X11 may already exist on some systems)
diffstat:
etc/postinstall | 47 ++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 46 insertions(+), 1 deletions(-)
diffs (63 lines):
diff -r 1aec696137ca -r 135eb209d8ec etc/postinstall
--- a/etc/postinstall Sun May 16 10:54:12 2004 +0000
+++ b/etc/postinstall Sun May 16 11:19:28 2004 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: postinstall,v 1.75 2004/04/18 04:02:27 dbj Exp $
+# $NetBSD: postinstall,v 1.76 2004/05/16 11:19:28 lukem Exp $
#
# Copyright (c) 2002-2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -583,6 +583,51 @@
}
#
+# X11
+#
+additem x11 "x11 configuration update"
+do_x11()
+{
+ [ -n "$1" ] || err 2 "USAGE: do_x11 fix|check"
+ op=$1
+
+ failed=0
+ _etcx11=${DEST_DIR}/etc/X11
+ if [ ! -d "${_etcx11}" ]; then
+ msg "${_etcx11} is not a directory; skipping check"
+ return 1
+ fi
+ _libx11=${DEST_DIR}/usr/X11R6/lib/X11
+ if [ ! -d "${_libx11}" ]; then
+ msg "${_libx11} is not a directory; skipping check"
+ return 1
+ fi
+
+ _notfixed=""
+ if [ "${op}" = "fix" ]; then
+ _notfixed=${NOT_FIXED}
+ fi
+
+ for d in \
+ fs lbxproxy proxymngr rstart twm xdm xinit xserver xsm \
+ ; do
+ sd=${_libx11}/${d}
+ ld=/etc/X11/${d}
+ td=${DEST_DIR}${ld}
+ if [ -h ${sd} ]; then
+ continue;
+ elif [ -d ${sd} ]; then
+ msg "Migrate ${sd} to ${td}${_notfixed}"
+ failed=1
+ elif [ -e ${sd} ]; then
+ msg "Unexpected file ${sd}${_notfixed}"
+ fi
+ done
+
+ return ${failed}
+}
+
+#
# wscons
#
additem wscons "wscons configuration file update"
Home |
Main Index |
Thread Index |
Old Index