summaryrefslogtreecommitdiff
path: root/scripts/02-net.sh
blob: 1736e74680bf7a91928dcba240d53b427a55651d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# scripts/02-net.sh

Net ()
{
	# Installing smbfs
	chroots "apt-get install --yes smbfs"

	if [ "${LIVE_ARCHITECTURE}" = "amd64" ] || [ "${LIVE_ARCHITECTURE}" = "i386" ]
	then
		mkdir "${LIVE_CHROOT}"/etc/mkinitramfs

		# Configuring initramfs for NFS
cat >> "${LIVE_CHROOT}"/etc/mkinitramfs/initramfs.conf << EOF
MODULES=netboot
BOOT=nfs
EOF
	fi

	# Installing syslinux
	Syslinux net

	# Installing linux-image
	Linuximage net

	# Installing memtest
	Memtest net

	if [ -z "${LIVE_VERBOSE}" ]
	then
		# Creating tarball
		cd "${LIVE_ROOT}" && cd .. && \
			tar cfz netboot.tar.gz `basename "${LIVE_ROOT}"` && \
			mv netboot.tar.gz "${LIVE_ROOT}"
	else
		# Creating tarball (debug)
		cd "${LIVE_ROOT}" && cd .. && \
			tar cfvz netboot.tar.gz `basename "${LIVE_ROOT}"` && \
			mv netboot.tar.gz "${LIVE_ROOT}"
	fi
}