CALL FOR TESTERS: linux-f8 infrastructure ports

Chagin Dmitry chagin.dmitry at gmail.com
Wed Apr 16 21:47:56 UTC 2008


On Tue, 8 Apr 2008, Boris Samorodov wrote:

> Hello List,

Is it possible to add in pkg-install scripts creation of links on often
used utilities? Like sed, awk and others. It is necessary, if shell 
scripts in which ways to these utilities are specified full are used.
For an example look a patch bellow.

--- emulators/linux_base-f8/pkg-deinstall.orig	2008-03-26 01:19:33.000000000 +0300
+++ emulators/linux_base-f8/pkg-deinstall	2008-04-17 00:40:34.000000000 +0400
@@ -3,6 +3,15 @@

  case "$2" in
  DEINSTALL)
+#
+# Remove symlinks
+#
+	if [ -L ${PKG_PREFIX}/bin/awk ]; then
+		rm ${PKG_PREFIX}/bin/awk
+	fi
+	if [ -L ${PKG_PREFIX}/bin/sed ]; then
+		rm ${PKG_PREFIX}/bin/sed
+	fi
  	if [ -n "`mount | grep ^linproc`" ] || \
  		[ -d /compat/linux/proc ]; then
  		echo ""
--- emulators/linux_base-f8/pkg-install.orig	2008-03-26 01:19:33.000000000 +0300
+++ emulators/linux_base-f8/pkg-install	2008-04-17 00:31:35.000000000 +0400
@@ -49,6 +49,15 @@
  		cp ${PKG_PREFIX}/etc/yp.conf.sample ${PKG_PREFIX}/etc/yp.conf
  	fi
  #
+# Add symlinks for usual utilities
+#
+	if [ ! -e ${PKG_PREFIX}/bin/awk ]; then
+		ln -s $(which awk) ${PKG_PREFIX}/bin/awk
+	fi
+	if [ ! -e ${PKG_PREFIX}/bin/sed ]; then
+		ln -s $(which sed) ${PKG_PREFIX}/bin/sed
+	fi
+#
  # This is needed when updating to ensure that already installed libraries
  # are recorded in ${PKG_PREFIX}/etc/ld.so.cache
  #


-- 
Have fun!
chd


More information about the freebsd-emulation mailing list