summaryrefslogtreecommitdiff
path: root/src/scripts/23net.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:04:22 +0200
committerDaniel Baumann <daniel@debian.org>2007-09-23 10:04:22 +0200
commit262e501463f4cc8bba690a1ef7cf0887cbfaa8cf (patch)
treed688ad07398eabd54adc7d0c0f8f32f128847688 /src/scripts/23net.sh
parentc9462fd48b0d4fb9968641e46c3350fb5e9986a2 (diff)
downloadvyos-live-build-262e501463f4cc8bba690a1ef7cf0887cbfaa8cf.tar.gz
vyos-live-build-262e501463f4cc8bba690a1ef7cf0887cbfaa8cf.zip
Adding live-package 0.99.5-1.
Diffstat (limited to 'src/scripts/23net.sh')
-rw-r--r--src/scripts/23net.sh98
1 files changed, 60 insertions, 38 deletions
diff --git a/src/scripts/23net.sh b/src/scripts/23net.sh
index 144118363..563420b2e 100644
--- a/src/scripts/23net.sh
+++ b/src/scripts/23net.sh
@@ -11,51 +11,73 @@
Net ()
{
- # Installing smbfs
- Chroot_exec "apt-get install --yes smbfs"
-
- if [ "${LIVE_ARCHITECTURE}" = "amd64" ] || [ "${LIVE_ARCHITECTURE}" = "i386" ]
+ if [ ! -f "${LIVE_ROOT}"/.stage/image_binary ]
then
- if [ ! -d "${LIVE_CHROOT}"/etc/initramfs-tools ]
- then
- mkdir "${LIVE_CHROOT}"/etc/initramfs-tools
- fi
+ # Installing smbfs
+ Chroot_exec "apt-get install --yes smbfs"
+
+ if [ "${LIVE_ARCHITECTURE}" = "amd64" ] || [ "${LIVE_ARCHITECTURE}" = "i386" ]
+ then
+ if [ ! -d "${LIVE_CHROOT}"/etc/initramfs-tools ]
+ then
+ mkdir "${LIVE_CHROOT}"/etc/initramfs-tools
+ fi
- # Configuring initramfs for NFS
+ # Configuring initramfs for NFS
cat >> "${LIVE_CHROOT}"/etc/initramfs-tools/initramfs.conf << EOF
MODULES=netboot
BOOT=nfs
NFSROOT=auto
EOF
- Chroot_exec "update-initramfs -tu"
- fi
+ Chroot_exec "update-initramfs -tu"
+ fi
- # Switching package indices to default
- Indices default
+ # Switching package indices to default
+ if [ "${LIVE_GENERIC_INDICES}" = "yes" ]
+ then
+ Indices default
+ fi
- # Generating rootfs image
- Genrootfs
-
- # Switching package indices to custom
- Indices custom
-
- # Installing syslinux
- Syslinux net
-
- # Installing linux-image
- Linuximage net
-
- # Installing memtest
- Memtest net
-
- # Creating tarball
- LIVE_BASENAME=`basename "${LIVE_ROOT}"`
- LIVE_BASE_SERVER_PATH=`basename "${LIVE_SERVER_PATH}"`
- cd "${LIVE_ROOT}" && \
- mv image "${LIVE_BASE_SERVER_PATH}" && \
- cd .. && \
- tar cfz netboot.tar.gz "${LIVE_BASENAME}/${LIVE_BASE_SERVER_PATH}" "${LIVE_BASENAME}/tftpboot" && \
- mv netboot.tar.gz "${LIVE_ROOT}" && \
- cd "${OLDPWD}" && \
- mv "${LIVE_BASE_SERVER_PATH}" image
+ # Generating rootfs image
+ Genrootfs
+
+ # Switching package indices to custom
+ if [ "${LIVE_GENERIC_INDICES}" = "yes" ]
+ then
+ Indices custom
+ fi
+
+ # Installing syslinux
+ Syslinux net
+
+ # Installing linux-image
+ Linuximage net
+
+ # Installing memtest
+ Memtest net
+
+ # Creating tarball
+ cd "${LIVE_ROOT}" && \
+ mv binary "`basename ${LIVE_SERVER_PATH}`" && \
+ cd .. && \
+ tar cfz binary.tar.gz "`basename ${LIVE_ROOT}`/`basename ${LIVE_SERVER_PATH}`" "`basename ${LIVE_ROOT}`/tftpboot" && \
+ mv binary.tar.gz "${LIVE_ROOT}" && \
+ cd "${OLDPWD}" && \
+ mv "`basename ${LIVE_SERVER_PATH}`" binary
+
+ # Touching stage file
+ touch "${LIVE_ROOT}"/.stage/image_binary
+ fi
+
+ if [ ! -f "${LIVE_ROOT}"/.stage/image_source ] && [ "${LIVE_SOURCE}" = "yes" ]
+ then
+ # Downloading sources
+ Sources
+
+ # Creating tarball
+ tar cfz source.tar.gz "${LIVE_ROOT}"/source
+
+ # Touching stage file
+ touch "${LIVE_ROOT}"/.stage/image_source
+ fi
}