summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1998-09-16 17:42:53 +0000
committerphk <phk@FreeBSD.org>1998-09-16 17:42:53 +0000
commit489c5f6e1e662e35b541fb7ab94c6d882dd279dd (patch)
tree6358062d0e9694ae998affcfb24d8a608ff5e142
parent9ce1c0c70a393fae328f5408433f48a50a5ef869 (diff)
downloadFreeBSD-src-489c5f6e1e662e35b541fb7ab94c6d882dd279dd.zip
FreeBSD-src-489c5f6e1e662e35b541fb7ab94c6d882dd279dd.tar.gz
Prevent ldconfig from choking by creating any missing directories.
-rwxr-xr-xtools/tools/upgrade/move_aout_libs.sh36
1 files changed, 18 insertions, 18 deletions
diff --git a/tools/tools/upgrade/move_aout_libs.sh b/tools/tools/upgrade/move_aout_libs.sh
index 0e5590d..1a1b906 100755
--- a/tools/tools/upgrade/move_aout_libs.sh
+++ b/tools/tools/upgrade/move_aout_libs.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $Id$
+# $Id: move_aout_libs.sh,v 1.1 1998/09/09 05:28:18 jb Exp $
#
# Search for a.out libraries and move them to an aout subdirectory of
# the elf library directory.
@@ -106,29 +106,29 @@ move_if_aout ( )
# Only search the directories specified.
for dir in $libdirs
do
- # Check that the directory actually exists. There is no point
- # searching missing directories.
- if test -d $dir; then
- echo "Searching library directory $dir for a.out libraries..."
+ # Make sure the directory exists, or ldconfig will choke later.
+ if test ! -d $dir; then
+ mkdir -p $dir $dir/aout
+ fi
+ echo "Searching library directory $dir for a.out libraries..."
- # Get a list of archive libraries.
- files=`ls $dir/*.a 2> /dev/null`
+ # Get a list of archive libraries.
+ files=`ls $dir/*.a 2> /dev/null`
- # a.out archive libraries look like this:
- aoutmagic="current ar archive random library"
+ # a.out archive libraries look like this:
+ aoutmagic="current ar archive random library"
- # Move each a.out archive library:
- move_if_aout
+ # Move each a.out archive library:
+ move_if_aout
- # Get a list of shared libraries
- files=`ls $dir/*.so.*.* 2> /dev/null`
+ # Get a list of shared libraries
+ files=`ls $dir/*.so.*.* 2> /dev/null`
- # a.out shared libraries look like this:
- aoutmagic="FreeBSD/i386 compact demand paged shared library not stripped"
+ # a.out shared libraries look like this:
+ aoutmagic="FreeBSD/i386 compact demand paged shared library not stripped"
- # Move each a.out shared library:
- move_if_aout
- fi
+ # Move each a.out shared library:
+ move_if_aout
done
# If we created the time stamp program, delete it:
OpenPOWER on IntegriCloud