/usr/sbin/create-drbl-live-by-pkg is in clonezilla 3.10.11-3.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
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 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 | #!/bin/bash
# Author: Steven Shiau <steven _at_ nchc org tw>
# License: GPL
# Description: This script is a wrapper program to run create-drbl-live. Here we assign the required packages to create such a live media.
#
set -e
#
DRBL_SCRIPT_PATH="${DRBL_SCRIPT_PATH:-/usr/share/drbl}"
. $DRBL_SCRIPT_PATH/sbin/drbl-conf-functions
. /etc/drbl/drbl-ocs.conf
. $DRBL_SCRIPT_PATH/sbin/ocs-functions
# Settings
# debian_mirror_url_def, debian_mirror_security_url_def, DRBL_REPOSITORY_URL_def and DRBL_GPG_KEY_URL are loaded from drbl-ocs.conf
# Based on Debian sid/lenny/etch...
debian_dist_default="wheezy"
# DRBL branch in drbl-core: experimental, unstable, testing, stable
drbl_branch_default="unstable"
# Live branch in drbl-core: experimental, unstable, testing, stable
live_branch_default="unstable"
# Type: task-xfce-desktop, task-gnome-desktop, task-ssh-server...
# Use "apt-cache search --names-only ^task-" to get the list.
# Ref: http://live.debian.net/manual/stable/html/live-manual.en.html#346
de_type_default="task-xfce-desktop"
cpu_flavor_default="486"
bootstrap_default="debootstrap"
categories_default="main"
# Common applications for all the version
common_text_app="arj curlftpfs gpart mdetect boinc-client dnsutils bind9-host myrescue pmount vim acpi laptop-detect acpi-support ipmitool git samba-common-bin"
# Fonts
font_pkgs="ttf-kochi-gothic"
# Common applications for the version with X
common_GUI_app="$font_pkgs leafpad conky gpicview isomaster hardinfo pcmanfm xarchiver xfburn iceweasel-l10n-es-es iceweasel-l10n-fr iceweasel-l10n-it iceweasel-l10n-ja iceweasel-l10n-zh-cn iceweasel-l10n-zh-tw scim-chewing scim-tables-ja scim-tables-zh im-switch xresprobe lxrandr wpagui swfdec-mozilla wicd xvnc4viewer zenity"
# $debian_pkgs_for_gparted is from drbl.conf
pkgs_for_task_xfce_desktop="lightdm thunar xfce4-terminal hicolor-icon-theme tango-icon-theme $common_text_app $common_GUI_app $debian_pkgs_for_gparted"
#pkgs_for_gnome="gnome-cups-manager $common_text_app $common_GUI_app $debian_pkgs_for_gparted"
#pkgs_for_kde="$common_text_app $common_GUI_app $debian_pkgs_for_gparted"
#pkgs_for_lxde="gdm3 $common_text_app $common_GUI_app $debian_pkgs_for_gparted"
#pkgs_for_standard="$common_text_app"
gen_source_tarball="no"
#
check_if_root
#
prog="$(basename $0)"
#
USAGE() {
echo "$prog [OPTION]"
echo "OPTION:"
echo "-b, --branch [s|stable|t|testing|u|unstable|e|experimental] Specify the DRBL branch to be used in Live CD. Default is stable."
echo "-bt, --bootstrap BOOTSTRAP Specify the bootsrap type as BOOTSTRAP (cdebootstrap or debootstrap). If not specified, $bootstrap_default will be used."
echo "-c, --categories CAT Sepcify the category, e.g. 'main', 'main non-free', default is \'$categories_default\' if not specified."
echo "-d, --debian-dist [stable|testing|unstable|etch|lenny|sid...] Assign Debian dist, the default is $DEBIAN_DIST_DEF if not assigned."
echo "-e, --drbl-live-branch [s|stable|t|testing|u|unstable|e|experimental] specifies the DRBL live branch to be used in Live CD. Default is stable."
echo "-f, --arch-flavor ARCH Assign the CPU architecture flavor as ARCH, e.g. 486 or 686. If it's not assigned, $cpu_flavor will be used."
echo "-g, --drbl-repo-url URL Assign the DRBL repository URL instead of default one $DRBL_REPOSITORY_URL_def."
echo "-k, --package FILE Specify package FILE to be installed in Live CD."
echo "-i, --assign-version-no NO Assign the version no as NO instead of date."
echo "-m, --mirror-url URL Assign the Debian repository URL instead of default one $debian_mirror_url_def. "
echo "-n, --live-kernel-pkg KERNEL_VER Assign kernel version as KERNEL_VER (KERNEL VER package must exist in repository. Ex. if KERNEL_VER is 2.6.20-1-486, then linux-image-2.6.20-1-486, squashfs-modules-2.6.20-1-486, and unionfs-modules-2.6.20-1-486 will be used."
echo "-s, --mirror-security-url URL Assign the Debian security repository URL instead of default one $debian_mirror_security_url_def."
echo "-o, --create-source-tarball Create a corresponding source image to the binary image. By default such an source image will not be created since this would require to download quite a few source packages."
echo "-t, --de-type [xfce|gnome|kde|standard] Specify the type to create DRBL live. Default is xfce"
echo "-x, --extra-boot-param EXTRA_PARAM Assign extra boot parameter EXTRA_PARAM for the kernel to read. These parameters are the same with that from live-initramfs. Ex. \"noeject\" can be use to not prompt to eject the CD on reboot."
echo "-y, --syslinux-ver VER Assign the syslinux version as VER. E.g. 6.02, 6.03-pre1"
echo "Ex: $0 -t xfce -i my-version-1"
}
# Parse command-line options
while [ $# -gt 0 ]; do
case "$1" in
-b|--branch)
shift
if [ -z "$(echo $1 |grep ^-.)" ]; then
# skip the -xx option, in case
drbl_branch="$1"
shift
fi
[ -z "$drbl_branch" ] && USAGE && exit 1
;;
-bt|--bootstrap)
shift
if [ -z "$(echo $1 |grep ^-.)" ]; then
# skip the -xx option, in case
bootstrap="$1"
shift
fi
[ -z "$bootstrap" ] && USAGE && exit 1
;;
-c|--categories)
shift
if [ -z "$(echo $1 |grep ^-.)" ]; then
# skip the -xx option, in case
categories="$1"
shift
fi
[ -z "$categories" ] && USAGE && exit 1
;;
-d|--debian-dist)
shift
if [ -z "$(echo $1 |grep ^-.)" ]; then
# skip the -xx option, in case
debian_dist="$1"
shift
fi
[ -z "$debian_dist" ] && USAGE && exit 1
;;
-e|--drbl-live-branch)
shift
if [ -z "$(echo $1 |grep ^-.)" ]; then
# skip the -xx option, in case
live_branch="$1"
shift
fi
[ -z "$live_branch" ] && USAGE && exit 1
;;
-i|--assign-version-no)
shift
if [ -z "$(echo $1 |grep ^-.)" ]; then
# skip the -xx option, in case
version_no="$1"
shift
fi
[ -z "$version_no" ] && USAGE && exit 1
;;
-f|--arch-flavor)
shift
if [ -z "$(echo $1 |grep ^-.)" ]; then
# skip the -xx option, in case
cpu_flavor="$1"
shift
fi
[ -z "$cpu_flavor" ] && USAGE && exit 1
;;
-g|--drbl-repo-url)
shift
if [ -z "$(echo $1 |grep ^-.)" ]; then
# skip the -xx option, in case
DRBL_REPOSITORY_URL="$1"
shift
fi
[ -z "$DRBL_REPOSITORY_URL" ] && USAGE && exit 1
;;
-k|--package)
shift
if [ -z "$(echo $1 |grep ^-.)" ]; then
# skip the -xx option, in case
extra_pkgs="$1"
shift
fi
[ -z "$extra_pkgs" ] && USAGE && exit 1
;;
-m|--mirror-url)
shift
if [ -z "$(echo $1 |grep ^-.)" ]; then
# skip the -xx option, in case
mirror_url="$1"
shift
fi
[ -z "$mirror_url" ] && USAGE && exit 1
;;
-o|--create-source-tarball)
gen_source_tarball="yes"
shift ;;
-s|--mirror-security-url)
shift
if [ -z "$(echo $1 |grep ^-.)" ]; then
# skip the -xx option, in case
mirror_security_url="$1"
shift
fi
[ -z "$mirror_security_url" ] && USAGE && exit 1
;;
-n|--live-kernel-pkg)
shift
if [ -z "$(echo $1 |grep ^-.)" ]; then
# skip the -xx option, in case
live_kernel_ver="$1"
shift
fi
[ -z "$live_kernel_ver" ] && USAGE && exit 1
;;
-t|--de-type)
shift
if [ -z "$(echo $1 |grep ^-.)" ]; then
# skip the -xx option, in case
de_type="$1"
shift
fi
[ -z "$de_type" ] && USAGE && exit 1
;;
-x|--extra-boot-param)
shift
if [ -z "$(echo $1 |grep ^-.)" ]; then
# skip the -xx option, in case
live_extra_boot_param="$1"
shift
fi
[ -z "$live_extra_boot_param" ] && USAGE && exit 1
;;
-y|--syslinux-ver)
shift
if [ -z "$(echo $1 |grep ^-.)" ]; then
# skip the -xx option, in case
isolinux_ver="$1"
shift
fi
[ -z "$isolinux_ver" ] && USAGE && exit 1
;;
-*) echo "${0}: ${1}: invalid option" >&2
USAGE >& 2
exit 2 ;;
*) break ;;
esac
done
#
# Apply default settings if not assigned
[ -z "$debian_dist" ] && debian_dist="$debian_dist_default"
[ -z "$categories" ] && categories="$categories_default"
[ -z "$drbl_branch" ] && drbl_branch="$drbl_branch_default"
[ -z "$live_branch" ] && live_branch="$live_branch_default"
[ -z "$de_type" ] && de_type="$de_type_default"
[ -n "$live_kernel_ver" ] && live_kernel_opt="-n $live_kernel_ver"
[ -n "$version_no" ] && ver_no_opt="-i $version_no"
[ -z "$DRBL_REPOSITORY_URL" ] && DRBL_REPOSITORY_URL="$DRBL_REPOSITORY_URL_def"
[ -z "$mirror_url" ] && mirror_url="$debian_mirror_url_def"
[ -z "$mirror_security_url" ] && mirror_security_url="$debian_mirror_security_url_def"
[ -z "$cpu_flavor" ] && cpu_flavor="$cpu_flavor_default"
[ -z "$bootstrap" ] && bootstrap=$bootstrap_default
if [ -n "$live_extra_boot_param" ]; then
live_extra_boot_param_1="-x"
live_extra_boot_param_2="$live_extra_boot_param"
fi
[ "$gen_source_tarball" = "yes" ] && gen_source_tarball_opt="-o"
[ -n "$isolinux_ver" ] && isolinux_ver_opt="-y $isolinux_ver"
eval pkgs=\$pkgs_for_${de_type//-/_}
time create-drbl-live -l en --bootstrap $bootstrap -c "$categories" -d $debian_dist -p $de_type -k "$pkgs $extra_pkgs" -b $drbl_branch -f $cpu_flavor -g $DRBL_REPOSITORY_URL -m $mirror_url -s $mirror_security_url -e $live_branch $gen_source_tarball_opt $live_extra_boot_param_1 "$live_extra_boot_param_2" $live_kernel_opt $ver_no_opt $isolinux_ver_opt
|