diff --git a/main/begin-install b/main/begin-install index c778bda..1e5823a 100755 --- a/main/begin-install +++ b/main/begin-install @@ -12,6 +12,7 @@ work_as_net_inst_server(){ activate_dmraid(){ modprobe dm_mod + /usr/sbin/dmsetup remove_all dmraid -p -ay for i in $(dmraid -s -c);do kpartx -a /dev/mapper/$i @@ -19,6 +20,7 @@ activate_dmraid(){ } dmraid=`cat /proc/cmdline | sed 's/.*dmraid=\([^ ]*\).*/\1/'` +os=`cat /proc/cmdline | sed 's/.*os=\([^ ]*\).*/\1/'` if [ "$(echo $dmraid |tr '[A-Z]' '[a-z]')" = "true" ];then activate_dmraid @@ -40,7 +42,11 @@ if [ $instmode = 'Auto' ];then cp /usr/lib/new_install/xml/install.xml /var/install/install.xml elif [ $instmode = 'StateGrid' ];then mkdir -pv /var/install/ - cp /usr/lib/new_install/xml/install-d5000.xml /var/install/install.xml + if [ $os = '40' ];then + cp /usr/lib/new_install/xml/install-40-d5000.xml /var/install/install.xml + else + cp /usr/lib/new_install/xml/install-d5000.xml /var/install/install.xml + fi fi case $instmode in diff --git a/operation/finish_install/98state_grid_custom.py b/operation/finish_install/98state_grid_custom.py index 4c826d9..e45ec7e 100755 --- a/operation/finish_install/98state_grid_custom.py +++ b/operation/finish_install/98state_grid_custom.py @@ -27,6 +27,7 @@ except: instmode = 'Text' if instmode == 'StateGrid': os.system("cp -r /usr/lib/StateGrid /mnt/opt/") + os.system("source /usr/lib/new_install/operation/finish_install/exec_install_40.sh") os.system("chroot /mnt /opt/StateGrid/setup.sh %s %s %s" %(username, homedir, shell)) os.system("rm -rf /mnt/opt/StateGrid") diff --git a/operation/finish_install/exec_install_40.sh b/operation/finish_install/exec_install_40.sh new file mode 100755 index 0000000..e502fc6 --- /dev/null +++ b/operation/finish_install/exec_install_40.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +os=`cat /proc/cmdline | sed 's/.*os=\([^ ]*\).*/\1/'` +if [ $os == "40" ];then + # 40 don't set bonding + sed 's/^\.\/set_bonding/\#\.\/set_bonding/g' /mnt/opt/StateGrid/setup.sh > /mnt/opt/StateGrid/setup.sh.bak + mv /mnt/opt/StateGrid/setup.sh.bak /mnt/opt/StateGrid/setup.sh + chmod +x /mnt/opt/StateGrid/setup.sh + # change desktop pic + echo "cp /opt/StateGrid/install_shell/kdesktoprc \$USER_HOME/.kde/share/config/" >> /mnt/opt/StateGrid/install_shell/create_users.sh + echo "cp /opt/StateGrid/install_shell/kdesktoprc \$HOME/.kde/share/config/" >> /mnt/opt/StateGrid/install_shell/create_users.sh + echo "cp /opt/StateGrid/install_shell/kdesktoprc /etc/skel/.kde/share/config/" >> /mnt/opt/StateGrid/install_shell/create_users.sh + echo "chown sys:sys /etc/skel/.kde/share/config/kdesktoprc" >> /mnt/opt/StateGrid/install_shell/create_users.sh + echo "chown \$USER_NAME:\$USER_NAME \$USER_NAME/.kde/share/config" >> /mnt/opt/StateGrid/install_shell/create_users.sh + # change issue + sed 's/6\.0\.42\.41/4\.2\.40/g' /mnt/etc/issue > /mnt/etc/issue.bak + mv /mnt/etc/issue.bak /mnt/etc/issue +fi diff --git a/operation/functions b/operation/functions index 1840c7c..33fbb7f 100644 --- a/operation/functions +++ b/operation/functions @@ -119,7 +119,7 @@ reumount () update_udev() { killall udevd - start_udev + start_udev 1>/dev/null 2>/dev/null } # @@ -144,7 +144,7 @@ get_disk_sym () update_udev # scsci's by-id may be have multi-links, we get first link # update hard disk informations. - devname=$(udevinfo -q symlink -p $path|tr " " "\n"|grep "$type"|head -n 1) + devname=$(udevadm info -q symlink -p $path|tr " " "\n"|grep "$type"|head -n 1) echo "$devname" diff --git a/xml/install-40-d5000.xml b/xml/install-40-d5000.xml new file mode 100644 index 0000000..a740174 --- /dev/null +++ b/xml/install-40-d5000.xml @@ -0,0 +1,511 @@ + + + 0123456789 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +