From c58d08c74a8458abae6413b3d9c8453368d0a298 Mon Sep 17 00:00:00 2001 From: Nico Dietrich Date: Mon, 6 Mar 2006 22:48:18 +0000 Subject: more installer progress git-svn-id: http://svn.openslx.org/svn/openslx/dxs/ld4@90 95ad53e4-c205-0410-b2fa-d234c58c8868 --- installer/.config.default | 3 +++ installer/distro-specs/exclude-ubuntu | 35 +++++++++++++++++++++++++++++++++++ installer/ld4-inst | 18 +++++++++++++----- 3 files changed, 51 insertions(+), 5 deletions(-) create mode 100644 installer/.config.default create mode 100644 installer/distro-specs/exclude-ubuntu (limited to 'installer') diff --git a/installer/.config.default b/installer/.config.default new file mode 100644 index 00000000..212fb538 --- /dev/null +++ b/installer/.config.default @@ -0,0 +1,3 @@ +rootdir="/nfsroot" +tftpbootdir="/tftpboot" + diff --git a/installer/distro-specs/exclude-ubuntu b/installer/distro-specs/exclude-ubuntu new file mode 100644 index 00000000..36d0b1d9 --- /dev/null +++ b/installer/distro-specs/exclude-ubuntu @@ -0,0 +1,35 @@ ++ /bin ++ /boot ++ /etc ++ /home ++ /lib ++ /lib64 ++ /media ++ /mnt ++ /opt ++ /root ++ /sbin ++ /tmp ++ /usr ++ /var +- .svn +- *~ +- *.old +- *.bak +- /lib/klibc/events/* +- /boot/initrd* +- /boot/grub +- /tmp/* +- /root/* +- /home/* +- /var/cache/man/* +- /var/tmp/* +- /var/log/* +- /var/run/* +- /var/spool/* +- /var/lib/xdm +- /usr/share/vmware/* +- *lost+found* +- /mnt/* +- /media/* +- /* diff --git a/installer/ld4-inst b/installer/ld4-inst index 92381450..39eab665 100755 --- a/installer/ld4-inst +++ b/installer/ld4-inst @@ -19,7 +19,7 @@ header() { precheck() { # check if running as root if [ "`id -u`" != "0" ]; then - echo "\nYou don't have the needed permission. Please rerun as root user!\n" + echo -e "\nYou don't have the needed permission. Please rerun as root user!\n" exit 1 fi @@ -27,7 +27,7 @@ precheck() { # rsync (server-side) which rsync >/dev/null if [ $? != 0 ] ; then - echo "\nYou need to install rsync on server side before installing!\n" + echo -e "\nYou need to install rsync on server side before installing!\n" exit 1 fi @@ -112,6 +112,7 @@ configure() { fi . .config + # TODO: bash doesnt allow concatenation of more than 2 logical expressions if ! [ -z $netmask -a -z $broadcast -a -z $netname -a -z $server ] ; then ipcfg=( `ifconfig eth0 | grep "inet addr" | sed -e "s,[a-zA-Z]*:,,g"` ) netmask=${ipcfg[3]} @@ -157,6 +158,7 @@ configure() { # ask for client distro ask "Client distribution: " client_distro ${client_distro} distro_check client_distro client_distro_ver + echo "Using ${client_distro} as client distribution" . config-${server_distro} @@ -185,8 +187,8 @@ configure() { copy_system() { rsync -avDe ssh --delete --exclude-from=distro-specs/exclude-${client_distro} ${rsyncsource} ${rootdir} # generate error message in case rsync didn't work and exit. - - # mksquashfs (background process) + + } @@ -230,7 +232,13 @@ setup_server () { create_initrd() { - # ../mkdxsinitrd + ../initrd/mkdxsinitrd -r ${rootdir} + + # generate links to kernel and initial ramdisk + ln -s ${rootdir}/boot/vmlinuz ${tftpbootdir} + ln -s ${rootdir}/boot/initrd ${tftpbootdir} + + # TODO: assure that vmlinuz and initrd exist!! } -- cgit v1.2.3-55-g7522