teelime
teeli****@users*****
2006年 3月 2日 (木) 23:04:28 JST
Index: dlkit2/cl.disklessify diff -u dlkit2/cl.disklessify:1.1.1.1 dlkit2/cl.disklessify:1.2 --- dlkit2/cl.disklessify:1.1.1.1 Fri Feb 24 01:15:29 2006 +++ dlkit2/cl.disklessify Thu Mar 2 23:04:27 2006 @@ -135,16 +135,17 @@ mode=${1:--probe} -. ./config.in +trandir=/cl.trandir +. $trandir/config.in check_nfsroot umount /localdisk > /dev/null 2>&1 mkdir -p /localdisk -echo "Mounting $CL_ROOT on $SV_NAME:$SV_FIN_ROOT ..." +echo "Mounting $CL_ROOT on $SV_IPADDR:$SV_FIN_ROOT ..." umount $CL_ROOT > /dev/null 2>&1 -mount $SV_NAME:$SV_FIN_ROOT $CL_ROOT +mount $SV_IPADDR:$SV_FIN_ROOT $CL_ROOT echo "Searching for ufs slice(s) on local disk(s)... " for ldev in `enum_slices` @@ -229,6 +230,17 @@ config_vfstab() { echo "Configuring /etc/vfstab ..." + + mkdir -p $CL_ROOT/$CL_SWAPFILE + + if [ -z "$CL_MOUNT_OPTION" ]; then + r_option="llock" + s_option="-" + else + r_option="llock,$CL_MOUNT_OPTION" + s_option="$CL_MOUNT_OPTION" + fi + while read line; do case "$line" in '#*') @@ -241,11 +253,10 @@ esac done < $CL_ROOT/etc/vfstab.localdisk > $CL_ROOT/etc/vfstab - echo "$SV_NAME:$SV_FIN_ROOT - / nfs - no -" >> $CL_ROOT/etc/vfstab + echo "$SV_NAME:$SV_FIN_ROOT - / nfs - no $r_option" >> $CL_ROOT/etc/vfstab - echo "$SV_NAME:$SV_SWAPFILE - $CL_SWAPFILE nfs - no -" >> $CL_ROOT/etc/vfstab + echo "$SV_NAME:$SV_SWAPFILE - $CL_SWAPFILE nfs - no $s_option" >> $CL_ROOT/etc/vfstab echo "$CL_SWAPFILE - - swap - no -" >> $CL_ROOT/etc/vfstab - mkdir -p $CL_ROOT/$CL_SWAPFILE } network_iface() { @@ -256,29 +267,10 @@ done } -config_bootenvrc() { - echon "Configuring boot/solaris/bootenv.rc ... " - nic=`network_iface` - if [ -z "$nic" ]; then - echo "network interface not found"; return 1 - fi - - node=`devnode_for_dev /dev/$nic /tmp/.v.curr_devlist` - node=`echo "$node" | sed -e 's/:.*$//'` - if [ -z "$node" ]; then - echo "node for /dev/$nic not found"; return 1 - fi - (sed '/^setprop bootpath /d' $CL_ROOT/boot/solaris/bootenv.rc.localdisk - echo "setprop bootpath '$node'") > $CL_ROOT/boot/solaris/bootenv.rc - echo "done" -} - setup_bootenv() { backup_file $CL_ROOT/etc/vfstab - backup_file $CL_ROOT/boot/solaris/bootenv.rc config_vfstab - config_bootenvrc } Index: dlkit2/cl.install-setup-disklessify diff -u dlkit2/cl.install-setup-disklessify:1.2 dlkit2/cl.install-setup-disklessify:1.3 --- dlkit2/cl.install-setup-disklessify:1.2 Sat Feb 25 03:30:17 2006 +++ dlkit2/cl.install-setup-disklessify Thu Mar 2 23:04:27 2006 @@ -1,6 +1,29 @@ #!/bin/sh -if [ ! -x /fake/cl.disklessify ]; then - echo "Error: /fake/cl.disklessify: not found or not executable" +echo 'c[32m + = = + = = = ====== = ==== ==== = = ====== ===== ==== + = = = = = = = = = == == = = = = + = = = ===== = = = = = == = ===== = = = + = = = = = = = = = = = = = = + = = = = = = = = = = = = = = = + == == ====== ====== ==== ==== = = ====== = ==== +[1;31m + ##### + # # #### # ## ##### # #### + # # # # # # # # # # + ##### # # # # # # # # #### + # # # # ###### ##### # # + # # # # # # # # # # # # + ##### #### ###### # # # # # #### +[1;36m + Solaris/x86 diskless-kit2: disklessify +[0;39m' + +if ( sh /cl.trandir/cl.disklessify ); then + # execution successful + : +else + echo "Error: /cl.trandir/cl.disklessify: not found or not executable" fi exec /bin/sh Index: dlkit2/sv.setup diff -u dlkit2/sv.setup:1.12 dlkit2/sv.setup:1.13 --- dlkit2/sv.setup:1.12 Mon Feb 27 23:14:31 2006 +++ dlkit2/sv.setup Thu Mar 2 23:04:27 2006 @@ -719,7 +719,7 @@ OSTYPE=`uname -s` remove_work_files check_install_type -[ "$INSTALL_TYPE" = "diskless" -a "$BOOT_TYPE" = "newboot" ] && create_mininfsroot +[ "$INSTALL_TYPE" != "netinstall" -a "$BOOT_TYPE" = "newboot" ] && create_mininfsroot prepare_base_dirs $use_dvddir && enumerate_packages $use_fin_root && make_swap_file @@ -732,7 +732,7 @@ $use_instroot && prepare_installation_env [ $INSTALL_TYPE = diskless ] && prepare_postinstall_env [ $INSTALL_TYPE = offline ] && prepare_postinstall_env -[ "$INSTALL_TYPE" = "diskless" -a "$BOOT_TYPE" = "newboot" ] && create_boot_archive +[ "$INSTALL_TYPE" != "netinstall" -a "$BOOT_TYPE" = "newboot" ] && create_boot_archive transfer_installation_script finalize_1st_stage