[dl-x86solaris-devel 107] CVS update: dlkit2/cl

Back to archive index

SAWADA Keiji card_capto****@users*****
2006年 4月 1日 (土) 15:02:36 JST


Index: dlkit2/cl/diskless-installer
diff -u dlkit2/cl/diskless-installer:1.1.2.2 dlkit2/cl/diskless-installer:1.1.2.3
--- dlkit2/cl/diskless-installer:1.1.2.2	Wed Mar 29 02:07:51 2006
+++ dlkit2/cl/diskless-installer	Sat Apr  1 15:02:36 2006
@@ -12,13 +12,13 @@
 # modify this program.  Whatever you choose, this software comes with
 # absolutely no warranty.
 
-set -eux
+set -e
 
 trandir=/dlkit
 . $trandir/config.in
 CL_ROOT=/a
-
 PKGDIR=/cdrom/Solaris_*/Product/
+
 LOG_DIR=$CL_ROOT/var/sadm/install/dlkit_logs
 DONE_DIR=$CL_ROOT/var/sadm/install/dlkit_done
 FAIL_DIR=$CL_ROOT/var/sadm/install/dlkit_failed
@@ -60,12 +60,17 @@
     fi
 }
 
+add_package() {
+    $trandir/dlpkgadd "$@"
+}
+
 install_pkgs() {
     mkdir -p $LOG_DIR $DONE_DIR $FAIL_DIR
     set +e
     total=`wc -l < $trandir/pkglist`; total=`expr $total + 0`
     i=`ls -1 $DONE_DIR | wc -l`; i=`expr $i + 0`
     set -e
+    failed=''
     while read pkg; do
 	if [ -f $DONE_DIR/$pkg ]; then continue; fi
 
@@ -73,12 +78,12 @@
 	name=`get_package_name "$pkg"`
 	printf "Installing %s, %s [%d/%d]... " $pkg "$name" $i $total
 
-	if $trandir/dlpkgadd $pkg > $LOG_DIR/$pkg 2>&1; then
+	if add_package $pkg > $LOG_DIR/$pkg 2>&1; then
 	    echo "done"
 	    touch $DONE_DIR/$pkg; rm -f $FAIL_DIR/$pkg
 	else
 	    echo "**FAILED**"
-	    touch $FAIL_DIR/$pkg
+	    touch $FAIL_DIR/$pkg; failed="$failed $pkg"
 	fi
     done < $trandir/pkglist
 
@@ -94,7 +99,7 @@
 }
 
 config_etc() {
-    echo "Installing directory under /etc..."
+    echo "Creating directory under /etc..."
     (cd $trandir/etc; find . -type d -print) | while read d; do
 	mkdir -p $CL_ROOT/etc/$d
     done
@@ -106,14 +111,8 @@
 	cp $trandir/etc/$f $CL_ROOT/etc/$f
     done
 
-    if [ -f $trandir/nsswitch.templ ]; then
-	backup_distfile $CL_ROOT/etc/nsswitch.conf
-	cp $CL_ROOT/etc/nsswitch.`cat $trandir/nsswitch.templ` \
-	    $CL_ROOT/etc/nsswitch.conf
-    fi
-
     if [ ! -z "$CL_TIMEZONE" ]; then
-	rtc -z "$CL_TIMEZONE"
+	rtc -z "$CL_TIMEZONE" # generate now
 	cp /etc/rtc_config $CL_ROOT/etc/rtc_config
     fi
 
@@ -177,7 +176,7 @@
 }
 
 config_postinstall_env() {
-    echo "Configuring post-installation environment... "
+    echo "Configuring postinstallation environment... "
 
     if [ ! -z "$CL_KEYBOARD" ]; then
 	backup_distfile $CL_ROOT/boot/solaris/bootenv.rc
Index: dlkit2/cl/package-reinstall.sh.in
diff -u /dev/null dlkit2/cl/package-reinstall.sh.in:1.1.2.1
--- /dev/null	Sat Apr  1 15:02:36 2006
+++ dlkit2/cl/package-reinstall.sh.in	Sat Apr  1 15:02:36 2006
@@ -0,0 +1,46 @@
+#!/bin/false
+# -*- shell-script -*-
+# package-reinstall.sh.in - template script for adding package after
+# "diskless" installation.
+
+LANG=C
+export LANG
+
+ADMIN=/tmp/admin.$$
+DONE_DIR=/var/sadm/install/dlkit_done
+FAIL_DIR=/var/sadm/install/dlkit_failed
+PKGDIR=/cdrom
+
+set +e
+umount /cdrom > /dev/null 2>&1
+set -e
+mkdir -p /cdrom > /dev/null 2>&1
+mount_cdrom
+packages=`cd $FAIL_DIR && ls`
+set +e
+
+cat > $ADMIN <<EOF
+mail=
+instance=overwrite
+partial=nocheck
+runlevel=nocheck
+idepend=nocheck
+rdepend=nocheck
+space=nocheck
+setuid=nocheck
+conflict=nocheck
+action=nocheck
+basedir=default
+EOF
+
+for pkg in $packages; do
+    if pkgadd -d $PKGDIR -a $ADMIN $pkg; then
+	touch $DONE_DIR/$pkg; rm -f $FAIL_DIR/$pkg
+    else
+	touch $FAIL_DIR/$pkg
+    fi
+done
+
+umount /cdrom
+rmdir /cdrom
+rm $ADMIN
Index: dlkit2/cl/package-reinstaller.sh.in
diff -u dlkit2/cl/package-reinstaller.sh.in:1.1.2.1 dlkit2/cl/package-reinstaller.sh.in:removed
--- dlkit2/cl/package-reinstaller.sh.in:1.1.2.1	Wed Mar 29 02:07:17 2006
+++ dlkit2/cl/package-reinstaller.sh.in	Sat Apr  1 15:02:36 2006
@@ -1,41 +0,0 @@
-#!/bin/false
-# -*- shell-script -*-
-# package-reinstaller.sh.in - template script for adding package after
-# "diskless" installation.
-
-LANG=C
-export LANG
-
-ADMIN=/tmp/admin.$$
-PKGDIR=/cdrom/Solaris_*/Product/
-DONE_DIR=/var/sadm/install/dlkit_done
-FAIL_DIR=/var/sadm/install/dlkit_failed
-packages=`cd $FAIL_DIR && ls`
-
-mkdir /cdrom > /dev/null 2>&1
-mount_cdrom
-
-cat > $ADMIN <<EOF
-mail=
-instance=overwrite
-partial=nocheck
-runlevel=nocheck
-idepend=nocheck
-rdepend=nocheck
-space=nocheck
-setuid=nocheck
-conflict=nocheck
-action=nocheck
-basedir=default
-EOF
-
-for package in $packages; do
-    if pkgadd -d $PKGDIR -a $ADMIN $package; then
-	touch $DONE_DIR/$pkg; rm -f $FAIL_DIR/$pkg
-    else
-	touch $FAIL_DIR/$pkg
-    fi
-done
-
-umount /cdrom
-rm $ADMIN


dl-x86solaris-devel メーリングリストの案内
Back to archive index