diff --git a/scripts/integrate-distro.sh b/scripts/integrate-distro.sh index 8c90d198..9777d560 100644 --- a/scripts/integrate-distro.sh +++ b/scripts/integrate-distro.sh @@ -6,7 +6,44 @@ arch=`uname -m` suse_version=12.3 o_name=suse-$suse_version cmd=install -initrd_modules="aufs via-rhine e1000 e1000e myri10ge forcedeth usbcore ohci-hcd ehci-hcd uhci-hcd hid usbhid ahci 8139too sata_nv" + +initrd_modules=" + via-rhine + r8169 + e1000 + e1000e + myri10ge + forcedeth + 8139too + sata_nv + nfs + nfs_acl + auth_rpcgss + nfsv3 + nfsv4 + fscache + lockd + sunrpc + + sis + edd + sisfb + evdev + shpchp + sis_agp + hwmon + aufs + ahci + libahci + usbhid + hid + uhci_hcd + ohci_hcd + ehci_hcd + usbcore + hid-generic +" + kernel_flavour=-default case $suse_version in @@ -72,6 +109,7 @@ case $suse_version in payload_pkgs=" nscd + usbutils " kernel_version=3.7.10-jng12-default @@ -205,13 +243,14 @@ usage() -n target-name -p file with root password -a architecture + -c copy-source-dir " [ "$1" ] && exit $1 } get_opts() { - set -- `getopt 'hd:n:a:p:' $*` + set -- `getopt 'hd:n:a:p:c:' $*` while [ "$1" != -- ] ; do case "$1" in -h) @@ -233,6 +272,10 @@ get_opts() root_password_file=$2 shift ;; + -c) + copy_source_dir=$2 + shift + ;; *) usage 1 ;; @@ -483,9 +526,9 @@ make_etc_fstab() |debugfs /sys/kernel/debug debugfs noauto 0 0 |usbfs /proc/bus/usb usbfs noauto 0 0 |devpts /dev/pts devpts mode=0620,gid=5 0 0 - |/dev/sda2 /boot auto defaults 0 0 |/usr/share/syslinux /srv/nfs/boot/pxe/bin auto bind 0 0 EOT + #|/dev/sda2 /boot auto defaults 0 0 } make_etc_sysctl_conf() @@ -592,7 +635,7 @@ make_netboot_etc_fstab() _cat</dev/null | xargs basename | sed 's/vmlinuz-//'` + [ "$copy_source_dir" ] && { + echo "=== copying over dir $copy_source_dir" + cp -rLp $copy_source_dir/* $root/ + chroot $root /sbin/mkinitrd_setup # TODO remove this + } + # seed the ldap database # FIXME: this does not work off a netboot distro slapcat | chroot $root /usr/sbin/slapadd -qw @@ -889,7 +949,16 @@ cmd_install() set_sysconf_value etc/sysconfig/dhcpd DHCPD_CONF_INCLUDE_FILES \ "/etc/hosts /etc/ldap.conf /etc/openldap/ldap.conf /etc/certs /etc/nsswitch.conf /etc/dhcpd.conf.d" - cat $root_password_file | chroot $root /usr/bin/passwd --stdin + echo "=== using root password file $root_password_file" + case $suse_version in + 11.4) + cat $root_password_file | chroot $root /usr/bin/passwd --stdin + ;; + *) + echo -n root: | cat - $root_password_file | chroot $root /usr/sbin/chpasswd + ;; + esac + chroot $root /sbin/ldconfig chroot $root /sbin/SuSEconfig chroot $root /opt/jux/bin/jux-init-namespace.sh @@ -898,11 +967,14 @@ cmd_install() install -m 777 -d $root/srv/nfs/var/cores install -m 777 -d $root/var/cores - for c in \ - /etc/pam.d/* \ - ; do - cp -rp $c $root$c - done + chroot $root /usr/sbin/pam-config -c + chroot $root /usr/sbin/pam-config -a --ldap + +# for c in \ +# /etc/pam.d/* \ +# ; do +# cp -rp $c $root$c +# done unmount_devices [ -w "$install_dev" ] || {