mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
integrate-distro.sh: Ongoing improvements
- Add option -r (root directory) - Create ifcfg-eth0 in sysconfig Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
52dbb3927a
commit
8f7af9564b
1 changed files with 25 additions and 3 deletions
|
|
@ -126,6 +126,9 @@ case $suse_version in
|
|||
|
||||
kernel_version=3.7.10-jng12$kernel_flavour
|
||||
rpm_kernel_version=3.7.10~jng12-1
|
||||
|
||||
#kernel_version=3.9.9-jng20-1.2$kernel_flavour
|
||||
#rpm_kernel_version=3.9.9~jng20-1.2
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
@ -256,6 +259,7 @@ usage()
|
|||
-p file with root password
|
||||
-a architecture
|
||||
-k hook=command
|
||||
-r root directory
|
||||
-u user (for source-code-management login)
|
||||
|
||||
known hooks are:
|
||||
|
|
@ -275,7 +279,7 @@ usage()
|
|||
|
||||
get_opts()
|
||||
{
|
||||
set -- `getopt 'hd:n:a:p:k:u:w:s:' $*`
|
||||
set -- `getopt 'hd:n:a:p:k:u:w:s:r:' $*`
|
||||
while [ "$1" != -- ] ; do
|
||||
case "$1" in
|
||||
-h)
|
||||
|
|
@ -289,6 +293,10 @@ get_opts()
|
|||
o_name=$2
|
||||
shift
|
||||
;;
|
||||
-r)
|
||||
o_root=$2
|
||||
shift
|
||||
;;
|
||||
-a)
|
||||
arch=$2
|
||||
shift
|
||||
|
|
@ -556,6 +564,7 @@ zypper_repos()
|
|||
|
||||
setup_zypper_repos()
|
||||
{
|
||||
local name uri
|
||||
zypper_repos $@ | while read name uri; do
|
||||
run_chroot zypper $zypper_global_opts ar $uri $name
|
||||
done
|
||||
|
|
@ -746,6 +755,13 @@ make_home_ssh_conf()
|
|||
EOT
|
||||
}
|
||||
|
||||
make_etc_sysconfig_network_ifcfg_eth0()
|
||||
{
|
||||
_cat<<EOT
|
||||
|STARTMODE='nfsroot'
|
||||
EOT
|
||||
}
|
||||
|
||||
use_host_files()
|
||||
{
|
||||
local f
|
||||
|
|
@ -987,6 +1003,9 @@ cmd_install()
|
|||
make_home_ssh_conf > $root/root/.ssh/config
|
||||
run_chroot chmod 600 /root/.ssh/config
|
||||
|
||||
make_etc_sysconfig_network_ifcfg_eth0 > $root/etc/sysconfig/network/ifcfg-eth0
|
||||
run_chroot chmod 644 /etc/sysconfig/network/ifcfg-eth0
|
||||
|
||||
run_hook pkg-installed
|
||||
|
||||
fi # test
|
||||
|
|
@ -1075,8 +1094,11 @@ fi
|
|||
|
||||
[ ! "$scm_user" ] && scm_user=`whoami`
|
||||
|
||||
name=$o_name-$arch
|
||||
root=/srv/nfs/boot/distros/$name/ro
|
||||
if [ "$o_root" ]; then
|
||||
root=$o_root/ro
|
||||
else
|
||||
root=/srv/nfs/boot/distros/$o_name-$arch/ro
|
||||
fi
|
||||
|
||||
# -- set up variables denoting devices
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue