From 9189a42ff6a15fadc8acbcbee145c0d13ea85d15 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Mon, 23 Jan 2017 12:27:59 +0000 Subject: [PATCH] integrate-distro.sh: Make [repos.after-install] work Signed-off-by: Jan Lindemann --- scripts/integrate-distro.sh | 40 +++++++------------------------------ 1 file changed, 7 insertions(+), 33 deletions(-) diff --git a/scripts/integrate-distro.sh b/scripts/integrate-distro.sh index cd3049ba..7a6aae86 100644 --- a/scripts/integrate-distro.sh +++ b/scripts/integrate-distro.sh @@ -853,37 +853,11 @@ unmount_devices() rm -f $ssh_auth_sock } -# TODO: remove this > -zypper_repos_base() -{ - cfg_section repos.base -} - -zypper_repos_update() -{ - # need to do this, as empty list breaks for loop in setup_zypper_repos() - return 0 - cfg_section repos.update -} - -zypper_repos_payload() -{ - cfg_section repos.payload -} - -zypper_repos_special() -{ - return 0 - cfg_section repos.special -} -# TODO: remove this < - zypper_repos() { - local repo cmd + local repo for repo in $*; do - #cfg_section repos.$repo # hangs - zypper_repos_$repo + cfg_section repos.$repo done } @@ -1345,11 +1319,6 @@ cmd_install() #kernel_version=`readlink -f $root/boot/vmlinuz 2>/dev/null | xargs basename | sed 's/vmlinuz-//'` kernel_version=`run_chroot -q rpm -q kernel | sort -V | sed 's/_/-/g; s/\.\(i386\|x86_64\)$//; s/-[^.-]\+$//; s/^kernel-//'` - if have_cfg_file_section repos.after-install; then - run_chroot zypper mr --all --disable - run setup_zypper_repos after-install - fi - # TODO: should be done by package manager post install script run_chroot /opt/ytools/bin/jcs init @@ -1399,6 +1368,11 @@ cmd_install() run_chroot install -m 777 -d /srv/nfs/var/cores run_chroot install -m 777 -d /var/cores + if have_cfg_file_section repos.after-install; then + run_chroot zypper mr --all --disable + run setup_zypper_repos after-install + fi + unmount_devices [ -w "$install_dev" ] || { install -d -m 755 $root/../rw