mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-24 22:50:39 +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
|
kernel_version=3.7.10-jng12$kernel_flavour
|
||||||
rpm_kernel_version=3.7.10~jng12-1
|
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
|
esac
|
||||||
|
|
||||||
|
|
@ -256,6 +259,7 @@ usage()
|
||||||
-p file with root password
|
-p file with root password
|
||||||
-a architecture
|
-a architecture
|
||||||
-k hook=command
|
-k hook=command
|
||||||
|
-r root directory
|
||||||
-u user (for source-code-management login)
|
-u user (for source-code-management login)
|
||||||
|
|
||||||
known hooks are:
|
known hooks are:
|
||||||
|
|
@ -275,7 +279,7 @@ usage()
|
||||||
|
|
||||||
get_opts()
|
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
|
while [ "$1" != -- ] ; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h)
|
-h)
|
||||||
|
|
@ -289,6 +293,10 @@ get_opts()
|
||||||
o_name=$2
|
o_name=$2
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
-r)
|
||||||
|
o_root=$2
|
||||||
|
shift
|
||||||
|
;;
|
||||||
-a)
|
-a)
|
||||||
arch=$2
|
arch=$2
|
||||||
shift
|
shift
|
||||||
|
|
@ -556,6 +564,7 @@ zypper_repos()
|
||||||
|
|
||||||
setup_zypper_repos()
|
setup_zypper_repos()
|
||||||
{
|
{
|
||||||
|
local name uri
|
||||||
zypper_repos $@ | while read name uri; do
|
zypper_repos $@ | while read name uri; do
|
||||||
run_chroot zypper $zypper_global_opts ar $uri $name
|
run_chroot zypper $zypper_global_opts ar $uri $name
|
||||||
done
|
done
|
||||||
|
|
@ -746,6 +755,13 @@ make_home_ssh_conf()
|
||||||
EOT
|
EOT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
make_etc_sysconfig_network_ifcfg_eth0()
|
||||||
|
{
|
||||||
|
_cat<<EOT
|
||||||
|
|STARTMODE='nfsroot'
|
||||||
|
EOT
|
||||||
|
}
|
||||||
|
|
||||||
use_host_files()
|
use_host_files()
|
||||||
{
|
{
|
||||||
local f
|
local f
|
||||||
|
|
@ -987,6 +1003,9 @@ cmd_install()
|
||||||
make_home_ssh_conf > $root/root/.ssh/config
|
make_home_ssh_conf > $root/root/.ssh/config
|
||||||
run_chroot chmod 600 /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
|
run_hook pkg-installed
|
||||||
|
|
||||||
fi # test
|
fi # test
|
||||||
|
|
@ -1075,8 +1094,11 @@ fi
|
||||||
|
|
||||||
[ ! "$scm_user" ] && scm_user=`whoami`
|
[ ! "$scm_user" ] && scm_user=`whoami`
|
||||||
|
|
||||||
name=$o_name-$arch
|
if [ "$o_root" ]; then
|
||||||
root=/srv/nfs/boot/distros/$name/ro
|
root=$o_root/ro
|
||||||
|
else
|
||||||
|
root=/srv/nfs/boot/distros/$o_name-$arch/ro
|
||||||
|
fi
|
||||||
|
|
||||||
# -- set up variables denoting devices
|
# -- set up variables denoting devices
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue