diff options
author | Felix Endres | 2006-03-23 22:16:40 +0100 |
---|---|---|
committer | Felix Endres | 2006-03-23 22:16:40 +0100 |
commit | f5fa93662820152aec7c5f03797a7c309d0f9e3e (patch) | |
tree | fc855d344c9bab5fa1d2b262f084607a7f439785 /installer | |
parent | fix: missing semicolon (diff) | |
download | core-f5fa93662820152aec7c5f03797a7c309d0f9e3e.tar.gz core-f5fa93662820152aec7c5f03797a7c309d0f9e3e.tar.xz core-f5fa93662820152aec7c5f03797a7c309d0f9e3e.zip |
Installer works now for Ubuntu
git-svn-id: http://svn.openslx.org/svn/openslx/ld4@119 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'installer')
-rw-r--r-- | installer/default_files/default | 2 | ||||
-rwxr-xr-x | installer/ld4-inst | 32 |
2 files changed, 19 insertions, 15 deletions
diff --git a/installer/default_files/default b/installer/default_files/default index 597c98c0..f7c22c8d 100644 --- a/installer/default_files/default +++ b/installer/default_files/default @@ -32,7 +32,7 @@ LABEL dxsdefault MENU DEFAULT MENU LABEL 1. @@@client_distro@@@-@@@client_distro_ver@@@ Diskless KERNEL @@@server@@@::@@@tftpbootdir@@@/vmlinuz - APPEND nfsroot=@@@server@@@:@@@rootdir@@@ vga=0x317 splash=silent initrd=@@@server@@@::@@@tftpbootdir@@@/initrd apic dhcp noldsc vci=DXS + APPEND nfsroot=@@@server@@@:@@@rootdir@@@ vga=0x317 nosplash initrd=@@@server@@@::@@@tftpbootdir@@@/initrd apic dhcp noldsc vci=DXS ipappend 1 diff --git a/installer/ld4-inst b/installer/ld4-inst index e5216347..0240409b 100755 --- a/installer/ld4-inst +++ b/installer/ld4-inst @@ -219,7 +219,7 @@ setup_server () { timestamp=`date +%Y%m%d-%H%M` # creating central dxs configuration directory structure if it doesn't exist - for dir in dhcp nfs atftpd pxelinux ; do # TODO etc... + for dir in dhcp nfs atftpd pxelinux ; do [ -d ${dxs_conf}/${dir} ] || mkdir -p ${dxs_conf}/${dir} done @@ -231,32 +231,32 @@ setup_server () { # atftpd sed -e "s,/tftpboot,${tftpbootdir}," default_files/${atftpd_conf_name} > ${dxs_conf}/${dxs_atftpd_conf}-${timestamp} - # nfs + # nfs echo -e "# Bla Blub\n \ # NFS export entry for DXS\n\ ${rootdir} ${netname}/${netmask}(ro,no_root_squash,async)" >> ${dxs_conf}/${dxs_exports_conf}-${timestamp} # pxe [ -d ${tftpbootdir} ] || mkdir -p ${tftpbootdir} - rsync -a --exclude=.svn default_files/tftpboot ${tftpbootdir} + rsync -a --exclude=.svn default_files/tftpboot/* ${tftpbootdir} sed -e "s,@@@server@@@,${server},g;s,@@@tftpbootdir@@@,${tftpbootdir},g;s,@@@pxe_passwd@@@,${pxe_passwd},g;s,@@@client_distro@@@,${client_distro},g;s,@@@client_distro_ver@@@,${client_distro_ver},g;s,@@@rootdir@@@,${rootdir},g" default_files/default > ${dxs_conf}/${dxs_pxedefault_conf}-${timestamp} # TODO: loop over kernel and initial ramdisks and create corresponding entries in default - + # backing up original files - for cfile in ${dhcpd_conf} ${atftpd_conf} ${exports_conf} ; do + for cfile in ${dhcpd_conf} ${atftpd_conf} ${exports_conf} ${tftpbootdir}/${pxedefault_conf} ; do if [ -f ${cfile} -a ! -L ${cfile} ] ; then echo "Copying old ${cfile} to ${cfile}" - mv ${file} ${file}.original + mv ${cfile} ${cfile}.original elif [ -L ${cfile} ] ; then unlink ${cfile} fi done # linking files - for cfile in "${dxs_dhcpd_conf} ${dhcpd_conf}" "${dxs_atftpd_conf} ${atftpd_conf}" "${dxs_exports_conf} ${exports_conf}" "${dxs_pxedefault_conf} ${pxedefault_conf}" ; do + for cfile in "${dxs_dhcpd_conf} ${dhcpd_conf}" "${dxs_atftpd_conf} ${atftpd_conf}" "${dxs_exports_conf} ${exports_conf}" "${dxs_pxedefault_conf} ${tftpbootdir}/${pxedefault_conf}" ; do set -- $cfile ln -s ${dxs_conf}/${1}-${timestamp} ${2} done @@ -266,7 +266,6 @@ setup_server () { create_initrd() { # FIXME: mkdxsinitrd currently wants to run from own directory - # ugly workaround... cd ../initrd @@ -279,11 +278,16 @@ create_initrd() { # TODO: move this stuff in upper loop if [ -e ${rootdir}/boot/vmlinuz ] ; then - ln -s ${rootdir}/boot/vmlinuz ${tftpbootdir} + ln -sf ${rootdir}/boot/vmlinuz ${tftpbootdir} elif [ -e ${rootdir}/vmlinuz ] ; then - ln -s ${rootdir}/boot/vmlinuz ${tftpbootdir} + ln -sf ${rootdir}/boot/vmlinuz ${tftpbootdir} + elif [ -n "`ls ${rootdir}/boot/vmlinuz*`" ]; then + ln -sf `ls -1t ${rootdir}/boot/vmlinuz* | sed -n 1,1p` ${tftpbootdir}/vmlinuz + else echo "Could not find the Kernel. Please link the kernel to ${tftpbootdir}" fi - ln -s ${rootdir}/boot/initrd ${tftpbootdir} + # make sure /$tftbootdir exists + mkdir -p ${tftpbootdir} + ln -sf ${rootdir}/tmp/dxsinitrd.gz ${tftpbootdir}/initrd } @@ -308,8 +312,8 @@ pxedefault_conf="pxelinux.cfg/default" dxs_conf="/etc/dxs/" dxs_dhcpd_conf="dhcp/dhcpd.conf" dxs_atftpd_conf="atftpd/atftpd" -dxs_nfs_conf="nfs/exports" -dxs_pxedefault_conf="pxe/default" +dxs_exports_conf="nfs/exports" +dxs_pxedefault_conf="pxelinux/default" @@ -317,7 +321,7 @@ dxs_pxedefault_conf="pxe/default" header precheck #(run as root, rsync etc.) configure -copy_system +#copy_system create_initrd setup_server footer |