deleted useless script : operation/finish_install.py
add no raid install :
just move scripts/local-top/mdadm from initrd
this will support Lenovo RD440 machine
deleted: operation/finish_install.py
new file: operation/finish_install/97update_initrd_noraid.sh
modified: text/get_instmode.sh
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
# run finish_install scripts
|
||||
#
|
||||
|
||||
import os,sys
|
||||
sys.path.append('../interface')
|
||||
import ri_data
|
||||
|
||||
# get data from install.xml
|
||||
ri_data.init_from_xml()
|
||||
username = ri_data.StateGrid.username
|
||||
homedir = ri_data.StateGrid.home_dir
|
||||
shell = ri_data.StateGrid.shell
|
||||
|
||||
# run state grid custom scripts
|
||||
f = open('/proc/cmdline', 'r')
|
||||
cmdline = f.readline()
|
||||
f.close()
|
||||
instmode = cmdline.split(' ')[0].split('=')[1]
|
||||
if instmode == 'StateGrid':
|
||||
os.system("chroot /mnt /opt/finish_install/StateGrid/setup.sh %s %s %s" %(username, homedir, shell))
|
||||
|
||||
# run post_add scripts
|
||||
os.system("chroot /mnt /opt/finish_install/99finish_install.sh")
|
||||
|
||||
12
operation/finish_install/97update_initrd_noraid.sh
Executable file
12
operation/finish_install/97update_initrd_noraid.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
instmode=`cat /proc/cmdline | sed 's/.*instmode=\([^ ]*\).*/\1/'`
|
||||
if [ instmode == 'NoRaid' ];then
|
||||
mkdir -p /mnt/boot/t
|
||||
cd /mnt/boot/t
|
||||
zcat /mnt/boot/initrd.img-2.6.32.41-Rocky4.2-x86_64 |cpio -di
|
||||
rm scripts/local-top/mdadm
|
||||
find . |cpio -H newc -o |gzip -9 > /mnt/boot/initrd.img-2.6.32.41-Rocky4.2-x86_64
|
||||
cd -
|
||||
rm -rf /mnt/boot/t
|
||||
fi
|
||||
Reference in New Issue
Block a user