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

Back to archive index

teelime teeli****@users*****
2006年 9月 24日 (日) 14:34:40 JST


Index: dlkit2/cl/install-setup-netinstall
diff -u /dev/null dlkit2/cl/install-setup-netinstall:1.1.2.1
--- /dev/null	Sun Sep 24 14:34:40 2006
+++ dlkit2/cl/install-setup-netinstall	Sun Sep 24 14:34:40 2006
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+echo 'c
+ =     =
+ =  =  =  ======  =        ====    ====   =    =  ======      =====   ====
+ =  =  =  =       =       =    =  =    =  ==  ==  =             =    =    =
+ =  =  =  =====   =       =       =    =  = == =  =====         =    =    =
+ =  =  =  =       =       =       =    =  =    =  =             =    =    =
+ =  =  =  =       =       =    =  =    =  =    =  =             =    =    =
+  == ==   ======  ======   ====    ====   =    =  ======        =     ====
+
+           #####
+          #     #   ####   #         ##    #####      #     ####
+          #        #    #  #        #  #   #    #     #    #
+           #####   #    #  #       #    #  #    #     #     ####
+                #  #    #  #       ######  #####      #         #
+          #     #  #    #  #       #    #  #   #      #    #    #
+           #####    ####   ######  #    #  #    #     #     ####
+'
+
+set -e
+
+trandir=/dlkit
+. $trandir/config.in
+
+cp $trandir/post-install-netinstall /tmp/root/post-install.sh
+chmod +x /tmp/root/post-install.sh
+
+script=/sbin/install-setup.dist
+
+echo "Starting 'netinstall' installation..."
+
+if [ -f $script ]; then
+    chmod a+x $script
+    if $script; then
+	# installation successful
+	:
+    else
+	echo "ERROR: Installation failed. Run $script again."
+    fi
+else
+    echo "ERROR: $script not found"
+fi
+exec /bin/sh
Index: dlkit2/cl/post-install-netinstall
diff -u /dev/null dlkit2/cl/post-install-netinstall:1.1.2.1
--- /dev/null	Sun Sep 24 14:34:40 2006
+++ dlkit2/cl/post-install-netinstall	Sun Sep 24 14:34:40 2006
@@ -0,0 +1,63 @@
+#!/bin/sh
+# -*- shell-script -*-
+# diskless-installer - Solaris installer for "diskless" mode.  Runs at
+# client side (client version of "offline-installer")
+#
+# Copyright (c) 2005-2006 SAWADA Keiji <card_capto****@users*****>
+# Copyright (c) 2006 teelime <teeli****@users*****>
+#
+# This program is free software and has two license options; GNU
+# General Public License, or Common Development and Distribution
+# License.  You can and must select one when you redistribute and/or
+# modify this program.  Whatever you choose, this software comes with
+# absolutely no warranty.
+
+set -e
+
+trandir=/dlkit
+. $trandir/config.in
+CL_ROOT=/a
+
+config_package_reinstall_sh() {
+    (	echo "#!/bin/sh"
+	echo "mount_cdrom() {"
+	if [ -z "$CL_MOUNT_OPTION" ]; then
+	    echo "	mount $SV_IPADDR:$SV_PKGDIR /cdrom"
+	else
+	    echo "	mount -o $CL_MOUNT_OPTION $SV_IPADDR:$SV_PKGDIR /cdrom"
+	fi
+	echo "}"; echo; echo
+	cat $trandir/package-reinstall.sh.in
+    ) > $CL_ROOT/package-reinstall.sh
+    chmod +x $CL_ROOT/package-reinstall.sh
+}
+
+config_package_reinstall_sh
+sed -e  's/DONE_DIR\=.*/DONE_DIR\=\/var\/sadm\/install\/logs/' $CL_ROOT/package-reinstall.sh > $$.1.tmp
+sed -e  's/FAIL_DIR\=.*/FAIL_DIR\=\/var\/sadm\/install\/logs/' $$.1.tmp > $$.2.tmp
+sed -e  's/\ ls/\ ls SUN\*/' $$.2.tmp > $CL_ROOT/package-reinstall.sh
+rm -f $$.?.tmp
+chmod +x $CL_ROOT/package-reinstall.sh
+
+	#ToDo:
+    if [ ! -z "$CL_TIMEZONE" ]; then
+	rtc -z "$CL_TIMEZONE" # generate now
+	cp /etc/rtc_config $CL_ROOT/etc/rtc_config
+    fi
+
+if (grep "loghost" $CL_ROOT/etc/inet/hosts > /dev/null) then
+	:
+else
+	cat $CL_ROOT/etc/inet/hosts | sed 's/localhost/localhost loghost/' > $$.tmp
+	cat $$.tmp > $CL_ROOT/etc/inet/hosts
+	rm -f $$.tmp
+fi
+
+if (grep $CL_NAME $CL_ROOT/etc/inet/hosts > /dev/null) then
+	:
+else
+	netif=`ls $CL_ROOT/etc/hostname.* | cut -d. -f2`
+	touch $CL_ROOT/etc/dhcp.$netif
+fi
+
+echo "Run /package-reinstall.sh after reboot"


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