add a feature: when run install program you can skip partition
by use parameter -p or --skip-partition. modified: main/setup modified: operation/configure_fstab.sh modified: text/ri_main.py
This commit is contained in:
18
main/setup
18
main/setup
@@ -19,7 +19,6 @@
|
||||
#
|
||||
#===================================================================================
|
||||
#
|
||||
|
||||
#===================================================================================
|
||||
#Set variables
|
||||
#===================================================================================
|
||||
@@ -27,13 +26,15 @@ workdir="/usr/lib/new_install/text"
|
||||
exec_file='xinitrc_setup'
|
||||
work_write_dir='/var/install'
|
||||
configfile="../xml/install_cfg.xml"
|
||||
install_step_list_file="install_step_list.py"
|
||||
#===================================================================================
|
||||
#Performance function
|
||||
#===================================================================================
|
||||
usage(){
|
||||
echo "usage: $0 [-s|--style style][-g|--graph][-l|--language language][-n|--noXserver][-h|--help]"
|
||||
echo "usage: $0 [-s|--style style][-g|--graph][-l|--language language][-n|--noXserver][-p|--skip-partition][-h|--help]"
|
||||
echo "style [text|graph]"
|
||||
echo "language [english|chinese]"
|
||||
echo "skip-partition text install but skip partition"
|
||||
echo "default text install"
|
||||
}
|
||||
|
||||
@@ -52,16 +53,26 @@ config_execfile(){
|
||||
fi
|
||||
echo "python ri_main.py -l $2 -c $configfile" >> ${work_write_dir}/${exec_file}
|
||||
fi
|
||||
|
||||
echo "#!/usr/bin/env python" > ${work_write_dir}/${install_step_list_file}
|
||||
|
||||
if test "$skip_partition" == "yes"
|
||||
then
|
||||
echo "list = ['welcome','mountpoint','serialnumber','network','group','service','information']" >> ${work_write_dir}/${install_step_list_file}
|
||||
else
|
||||
echo "list = ['welcome','partition','raid','mountpoint','serialnumber','network','group','service','information']" >> ${work_write_dir}/${install_step_list_file}
|
||||
fi
|
||||
}
|
||||
|
||||
main(){
|
||||
local style='text'
|
||||
local language='chinese'
|
||||
local xstart='no'
|
||||
local skip_partition='no'
|
||||
#local dialog=''
|
||||
|
||||
#tmp=$(getopt -o c:dsl:nh --long style:,configfile:,language:,noXserver,help -- "$@")
|
||||
tmp=$(getopt -o c:sgl:nh --long configfile:,style,graph,language:,noXserver,help -- "$@")
|
||||
tmp=$(getopt -o c:sgl:nph --long configfile:,style,graph,language:,noXserver,skip-partition,help -- "$@")
|
||||
eval set -- "$tmp"
|
||||
|
||||
mkdir -p $work_write_dir
|
||||
@@ -73,6 +84,7 @@ main(){
|
||||
'-s'|'--style') xstart='no';style="text" ;workdir="/usr/lib/new_install/text";shift ;;
|
||||
'-l'|'--language') language="$2" ;shift 2;;
|
||||
'-n'|'--noXserver') xstart='no' ;shift ;;
|
||||
'-p'|'--skip-partition') skip_partition='yes' ;shift ;;
|
||||
'-h'|'--help') usage ; exit 0 ;;
|
||||
'--') shift; break ;;
|
||||
*) usage ; exit 1 ;;
|
||||
|
||||
Reference in New Issue
Block a user