diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lists/rescue | 56 | ||||
-rwxr-xr-x | src/main.sh | 11 | ||||
-rw-r--r-- | src/scripts/02defaults.sh | 12 | ||||
-rw-r--r-- | src/scripts/14chroot.sh | 18 | ||||
-rw-r--r-- | src/scripts/21image.sh | 14 |
5 files changed, 104 insertions, 7 deletions
diff --git a/src/lists/rescue b/src/lists/rescue new file mode 100644 index 0000000..a68503c --- /dev/null +++ b/src/lists/rescue @@ -0,0 +1,56 @@ +# /usr/share/make-live/lists/rescue - package list for make-live(1) + +# Minimal +eject file sudo vim-tiny + +# Standard +console-common locales + +# Rescue + +# Editors +mc nano-tiny qemacs-nox mg aview +# Harddisk +hdparm blktool scsitools +# Memory +memtester memtest86+ dmidecode +# System +procinfo pciutils usbutils hwinfo hwtools x86info cpuid +# Tools +tofrodos rpncalc units +# Browser +lynx links w3m +# Compression +unzip zip +# Backup +dar ddrescue gddrescue + +hal +read-edid +discover +wdiff +gawk +dc +dash +rlwrap +posh +chkrootkit +rkhunter +parted +partimage +grub +lilo +testdisk +xfsprogs +reiserfsprogs +e2fsprogs +ext2resize +ntfsprogs +dosfstools +genisoimage +wodim +dvd+rw-tools +clamav +clamav-data +wipe +secure-delete diff --git a/src/main.sh b/src/main.sh index cfffd83..efaab54 100755 --- a/src/main.sh +++ b/src/main.sh @@ -28,7 +28,7 @@ set -e BASE=${LIVE_BASE:-"/usr/share/make-live"} CONFIG="/etc/make-live.conf" PROGRAM="`basename ${0}`" -VERSION="0.99.14" +VERSION="0.99.17" CODENAME_OLDSTABLE="woody" CODENAME_STABLE="sarge" @@ -41,7 +41,7 @@ do . "${SCRIPT}" done -USAGE="Usage: ${PROGRAM} [-a|--architecture ARCHITECTURE] [-b|--bootappend KERNEL_PARAMETER|\"KERNEL_PARAMETERS\"] [--clone DIRECTORY] [--config FILE] [-c|--chroot DIRECTORY] [-d|--distribution DISTRIBUTION] [--with-generic-indices] [--without-generic-indices] [--with-recommends] [--without-recommends] [--filesystem FILESYSTEM] [-f|--flavour BOOTSTRAP_FLAVOUR] [--hook COMMAND|\"COMMANDS\"] [--include-chroot FILE|DIRECTORY] [--include-image FILE|DIRECTORY] [-k|--kernel KERNEL_FLAVOUR] [--manifest PACKAGE] [-m|--mirror URL] [--mirror-security URL] [--packages PACKAGE|\"PACKAGES\"] [-p|--package-list LIST|FILE] [--preseed FILE] [--proxy-ftp URL] [--proxy-http URL] [--repositories NAME] [-r|--root DIRECTORY] [-s|--section SECTION|\"SECTIONS\"] [--server-address HOSTNAME|IP] [--server-path DIRECTORY] [--templates DIRECTORY] [-t|--type TYPE]" +USAGE="Usage: ${PROGRAM} [-a|--architecture ARCHITECTURE] [-b|--bootappend KERNEL_PARAMETER|\"KERNEL_PARAMETERS\"] [--clone DIRECTORY] [--config FILE] [-c|--chroot DIRECTORY] [-d|--distribution DISTRIBUTION] [--with-generic-indices] [--without-generic-indices] [--with-recommends] [--without-recommends] [--filesystem FILESYSTEM] [-f|--flavour BOOTSTRAP_FLAVOUR] [--hook COMMAND|\"COMMANDS\"] [--include-chroot FILE|DIRECTORY] [--include-image FILE|DIRECTORY] [-k|--kernel KERNEL_FLAVOUR] [--manifest PACKAGE] [-m|--mirror URL] [-k|--keyring] [--mirror-security URL] [--packages PACKAGE|\"PACKAGES\"] [-p|--package-list LIST|FILE] [--preseed FILE] [--proxy-ftp URL] [--proxy-http URL] [--repositories NAME] [-r|--root DIRECTORY] [-s|--section SECTION|\"SECTIONS\"] [--server-address HOSTNAME|IP] [--server-path DIRECTORY] [--templates DIRECTORY] [-t|--type TYPE]" Help () { @@ -79,6 +79,7 @@ Help () echo " --manifest: specifies the pivot package to create filesystem.manifest-desktop upon (mostly \"ubuntu-live\")." echo " -m, --mirror: specifies debian mirror." echo " --mirror-security: specifies debian security mirror." + echo " --keyring: specifies keyring package." echo " --packages: specifies aditional packages." echo " -p, --package-list: specifies additonal package list." echo " --repositories: specifies custom repositories." @@ -164,7 +165,7 @@ Configuration () Main () { - ARGUMENTS="`getopt --longoptions root:,type:,architecture:,bootappend:,clone:,config:,chroot:,distribution:,filesystem:,flavour:,bootstrap-config:,hook:,include-chroot:,include-image:,kernel:,manifest:,mirror:,mirror-security:,output:,packages:,package-list:,proxy-ftp:,preseed:,proxy-http:,repositories:,section:,server-address:,server-path:,templates:,with-generic-indices,without-generic-indices,with-recommends,without-recommends,with-source,without-source,help,usage,version --name=${PROGRAM} --options r:t:a:b:c:d:f:k:m:o:p:s:huv --shell sh -- "${@}"`" + ARGUMENTS="`getopt --longoptions root:,type:,architecture:,bootappend:,clone:,config:,chroot:,distribution:,filesystem:,flavour:,bootstrap-config:,hook:,include-chroot:,include-image:,kernel:,manifest:,mirror:,keyring:,mirror-security:,output:,packages:,package-list:,proxy-ftp:,preseed:,proxy-http:,repositories:,section:,server-address:,server-path:,templates:,with-generic-indices,without-generic-indices,with-recommends,without-recommends,with-source,without-source,help,usage,version --name=${PROGRAM} --options r:t:a:b:c:d:f:k:m:o:p:s:huv --shell sh -- "${@}"`" if [ "${?}" != "0" ] then @@ -243,6 +244,10 @@ Main () LIVE_MIRROR="${2}"; shift 2 ;; + --keyring) + LIVE_REPOSITORY_KEYRING="${2}"; shift 2 + ;; + --mirror-security) LIVE_MIRROR_SECURITY="${2}"; shift 2 ;; diff --git a/src/scripts/02defaults.sh b/src/scripts/02defaults.sh index faca476..aa26f76 100644 --- a/src/scripts/02defaults.sh +++ b/src/scripts/02defaults.sh @@ -154,6 +154,12 @@ Defaults () LIVE_MIRROR="http://ftp.debian.org/debian/" fi + # Set debian keyring + if [ -z "${LIVE_REPOSITORY_KEYRING}" ] + then + LIVE_REPOSITORY_KEYRING="debian-archive-keyring" + fi + # Set debian security mirror if [ -z "${LIVE_MIRROR_SECURITY}" ] then @@ -248,4 +254,10 @@ Defaults () then LIVE_SOURCE="no" fi + + # Set disk volume + if [ -z "${LIVE_DISK_VOLUME}" ] + then + LIVE_DISK_VOLUME="Debian Live `date +%Y%m%d`" + fi } diff --git a/src/scripts/14chroot.sh b/src/scripts/14chroot.sh index 2e2b489..5132e8c 100644 --- a/src/scripts/14chroot.sh +++ b/src/scripts/14chroot.sh @@ -30,6 +30,16 @@ Chroot () # Mount proc mount proc-live -t proc "${LIVE_CHROOT}"/proc + # Avoid daemon starting + cat > "${LIVE_CHROOT}"/usr/sbin/policy-rc.d <<EOF +#!/bin/sh +echo +echo "Warning: invoke-rc.d policy in action. Skiping daemon starting" + +exit 101 +EOF + chmod 755 "${LIVE_CHROOT}"/usr/sbin/policy-rc.d + # Configure sources.list Indices custom initial @@ -42,7 +52,7 @@ Chroot () then if [ "${LIVE_FLAVOUR}" != "minimal" ] then - Chroot_exec "aptitude install --assume-yes debian-archive-keyring" + Chroot_exec "apt-get install --yes --force-yes ${LIVE_REPOSITORY_KEYRING}" for NAME in ${LIVE_REPOSITORIES} do @@ -172,9 +182,15 @@ Chroot () rm -rf "${LIVE_CHROOT}"/var/cache/apt mkdir -p "${LIVE_CHROOT}"/var/cache/apt/archives/partial + # Workaround binfmt-support /proc locking + umount "${LIVE_CHROOT}"/proc/sys/fs/binfmt_misc > /dev/null || true + # Unmount proc umount "${LIVE_CHROOT}"/proc + # Allow daemon starting + rm "${LIVE_CHROOT}"/usr/sbin/policy-rc.d + # Deconfigure network Patch_network deapply diff --git a/src/scripts/21image.sh b/src/scripts/21image.sh index d44d4f3..ba52d70 100644 --- a/src/scripts/21image.sh +++ b/src/scripts/21image.sh @@ -181,6 +181,10 @@ Syslinux () "${LIVE_ROOT}"/binary/isolinux rm -f "${LIVE_ROOT}"/binary/isolinux/pxelinux.cfg + if [ -n "${LIVE_ISOLINUX_SPLASH}" ]; then + cp "${LIVE_ISOLINUX_SPLASH}" "${LIVE_ROOT}/binary/isolinux/splash.rle" + fi + # Configure syslinux templates sed -i -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" "${LIVE_ROOT}"/binary/isolinux/isolinux.cfg sed -i -e "s/LIVE_DATE/`date +%Y%m%d`/" "${LIVE_ROOT}"/binary/isolinux/f1.txt @@ -200,6 +204,10 @@ Syslinux () rm -f "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/isolinux.cfg sed -i -e 's#splash.rle#pxelinux.cfg/splash.rle#' "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/isolinux.txt + if [ -n "${LIVE_ISOLINUX_SPLASH}" ]; then + cp "${LIVE_ISOLINUX_SPLASH}" "${LIVE_ROOT}/tftpboot/pxelinux.cfg/splash.rle" + fi + # Configure syslinux templates sed -i -e "s/LIVE_SERVER_ADDRESS/${LIVE_SERVER_ADDRESS}/" -e "s#LIVE_SERVER_PATH#${LIVE_SERVER_PATH}#" -e "s#LIVE_BOOTAPPEND#${LIVE_BOOTAPPEND}#" "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/default sed -i -e "s/LIVE_DATE/`date +%Y%m%d`/" "${LIVE_ROOT}"/tftpboot/pxelinux.cfg/f1.txt @@ -296,19 +304,19 @@ Mkisofs () if [ "${LIVE_ARCHITECTURE}" = "amd64" ] || [ "${LIVE_ARCHITECTURE}" = "i386" ] then # Create image - mkisofs -A "Debian Live" -p "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -publisher "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -o "${LIVE_ROOT}"/"${LIVE_IMAGE}"binary.iso -r -J -l -V "Debian Live `date +%Y%m%d`" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table "${LIVE_ROOT}"/binary ${LIVE_INCLUDE_IMAGE} + genisoimage -A "Debian Live" -p "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -publisher "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -o "${LIVE_ROOT}"/"${LIVE_IMAGE}"binary.iso -r -J -l -V "${LIVE_DISK_VOLUME}" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table "${LIVE_ROOT}"/binary ${LIVE_INCLUDE_IMAGE} else echo "W: Bootloader on your architecture not yet supported (Continuing in 5 seconds)." sleep 5 # Create image - mkisofs -A "Debian Live" -p "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -publisher "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -o "${LIVE_ROOT}"/"${LIVE_IMAGE}"binary.iso -r -J -l -V "Debian Live `date +%Y%m%d`" "${LIVE_ROOT}"/binary ${LIVE_INCLUDE_IMAGE} + genisoimage -A "Debian Live" -p "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -publisher "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -o "${LIVE_ROOT}"/"${LIVE_IMAGE}"binary.iso -r -J -l -V "${LIVE_DISK_VOLUME}" "${LIVE_ROOT}"/binary ${LIVE_INCLUDE_IMAGE} fi ;; source) # Create image - mkisofs -A "Debian Live" -p "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -publisher "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -o "${LIVE_ROOT}"/"${LIVE_IMAGE}"source.iso -r -J -l -V "Debian Live `date +%Y%m%d`" "${LIVE_ROOT}"/source + genisoimage -A "Debian Live" -p "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -publisher "Debian Live; http://debian-live.alioth.debian.org/; debian-live-devel@lists.alioth.debian.org" -o "${LIVE_ROOT}"/"${LIVE_IMAGE}"source.iso -r -J -l -V "${LIVE_DISK_VOLUME}" "${LIVE_ROOT}"/source ;; esac } |