mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
integrate-distro.sh: Add support for services
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
c59479b6ba
commit
c9a236eee6
1 changed files with 44 additions and 24 deletions
|
|
@ -404,6 +404,15 @@ payload_pkgs="
|
|||
ytools-run
|
||||
"
|
||||
|
||||
services="
|
||||
$services
|
||||
boot.juxearly
|
||||
boot.bprof
|
||||
sshd
|
||||
jux
|
||||
"
|
||||
|
||||
|
||||
# fetchmsttfonts
|
||||
# -- functions
|
||||
usage()
|
||||
|
|
@ -606,6 +615,16 @@ cfg_default()
|
|||
usbfs /proc/bus/usb usbfs noauto 0 0
|
||||
devpts /dev/pts devpts mode=0620,gid=5 0 0
|
||||
/usr/share/syslinux /srv/nfs/boot/pxe/bin auto bind 0 0
|
||||
|
||||
[jcs_conf]
|
||||
jcs_dir=\$HOME/local/src/cvs.stable/conf/jannet.de/minimalix/suse-$suse_version
|
||||
jcs_owner=root
|
||||
jcs_group=root
|
||||
jcs_log_dir=\$jcs_dir/log
|
||||
jcs_file_extension=inf
|
||||
use_checksum=false
|
||||
update_checksum_command="/home/tripwire/bin/fs_checksum.sh update"
|
||||
jcs_http_path=http://www.jannet.de
|
||||
EOT
|
||||
}
|
||||
|
||||
|
|
@ -873,6 +892,15 @@ pkgs()
|
|||
eval echo \$$var
|
||||
}
|
||||
|
||||
services()
|
||||
{
|
||||
if have_cfg_file_section "services.all"; then
|
||||
cfg_file_section "services.all"
|
||||
return 0
|
||||
fi
|
||||
echo $services
|
||||
}
|
||||
|
||||
make_etc_fstab()
|
||||
{
|
||||
cfg_section fstab
|
||||
|
|
@ -1000,16 +1028,7 @@ EOT
|
|||
|
||||
make_etc_jcs_jcs_conf()
|
||||
{
|
||||
_cat << EOT
|
||||
|jcs_dir=\$HOME/local/src/cvs.stable/conf/jannet.de/minimalix/suse-$suse_version
|
||||
|jcs_owner=root
|
||||
|jcs_group=root
|
||||
|jcs_log_dir=\$jcs_dir/log
|
||||
|jcs_file_extension=inf
|
||||
|use_checksum=false
|
||||
|update_checksum_command="/home/tripwire/bin/fs_checksum.sh update"
|
||||
|jcs_http_path=http://www.jannet.de
|
||||
EOT
|
||||
cfg_section jcs_conf
|
||||
}
|
||||
|
||||
make_home_ssh_conf()
|
||||
|
|
@ -1201,21 +1220,15 @@ setup_root_directory()
|
|||
|
||||
insserv_all()
|
||||
{
|
||||
local local_services="
|
||||
boot.juxearly
|
||||
boot.bprof
|
||||
sshd
|
||||
jux
|
||||
$services
|
||||
"
|
||||
local services=`services`
|
||||
|
||||
case $suse_version in
|
||||
11.4)
|
||||
run_chroot /sbin/insserv -de $local_services
|
||||
run_chroot /sbin/insserv -de $services
|
||||
;;
|
||||
*)
|
||||
local s
|
||||
for s in $local_services; do
|
||||
for s in $services; do
|
||||
run_chroot systemctl enable $s.service
|
||||
done
|
||||
;;
|
||||
|
|
@ -1231,6 +1244,15 @@ set_sysconf_value()
|
|||
mv $root/$file.tmp $root/$file
|
||||
}
|
||||
|
||||
install_pkgs()
|
||||
{
|
||||
local flavour="$1"
|
||||
pkgs $flavour | grep . || return 0
|
||||
echo "=== installing $flavour packages >"
|
||||
run_chroot zypper $zypper_global_opts install --auto-agree-with-licenses `pkgs $flavour` || return 1
|
||||
echo "=== installing $flavour packages <"
|
||||
}
|
||||
|
||||
cmd_install()
|
||||
{
|
||||
local c
|
||||
|
|
@ -1261,7 +1283,7 @@ cmd_install()
|
|||
run_chroot install -d -m 755 /etc/dhcpd.conf.d
|
||||
|
||||
#make_etc_resolv_conf > $root/etc/resolv.conf
|
||||
#make_etc_fstab > $root/etc/fstab
|
||||
make_etc_fstab > $root/etc/fstab
|
||||
|
||||
run setup_zypper_repos base update payload
|
||||
|
||||
|
|
@ -1269,12 +1291,10 @@ cmd_install()
|
|||
run_chroot zypper $zypper_global_opts refresh
|
||||
echo "=== refreshing <"
|
||||
|
||||
echo "=== installing payload packages >"
|
||||
run_chroot zypper $zypper_global_opts install --auto-agree-with-licenses `pkgs payload`
|
||||
echo "=== installing payload packages <"
|
||||
install_pkgs payload
|
||||
|
||||
run setup_zypper_repos special
|
||||
run_chroot zypper $zypper_global_opts install --auto-agree-with-licenses `pkgs special`
|
||||
install_pkgs special
|
||||
|
||||
# run_chroot zypper $zypper_global_opts -t srcpackage --download-only `pkgs payload`
|
||||
#kernel_version=`readlink -f $root/boot/vmlinuz 2>/dev/null | xargs basename | sed 's/vmlinuz-//'`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue