History

mklive: added -b option to specify an alternative base-system pkg.

Use -b base-system-runit to generate an image with eudev+runit.

Juan RP committed 12 years ago

Commit 82681e71 parent 1e28a7a1 file · +13 −6Browse files

Unified · Split

mklive.sh.in+13−6
@@ -71,6 +71,7 @@ usage() { · 70 unmodified lines
7171 Usage: $(basename $0) [options]
7272
7373 Options:
74+ -b <system-pkg> Set an alternative base-system package (defaults to base-system).
7475 -r <repo-url> Use this XBPS repository (may be specified multiple times).
7576 -c <cachedir> Use this XBPS cache directory (/var/cache/xbps if unset).
7677 -k <keymap> Default keymap to use (us if unset)
@@ -138,8 +139,12 @@ generate_initramfs() { · 61 unmodified lines
138139 copy_dracut_files $VOIDHOSTDIR
139140 $XBPS_INSTALL_CMD -r $VOIDHOSTDIR $XBPS_REPOSITORY $XBPS_CACHEDIR -y base-system >>$LOGFILE 2>&1
140141
142+ if [ "$BASE_SYSTEM_PKG" = "base-system-runit" ]; then
143+ # for runit omit the systemd module
144+ _args="--omit 'systemd'"
145+ fi
141146 xbps-uchroot $VOIDHOSTDIR /usr/bin/dracut --${INITRAMFS_COMPRESSION} \
142− --force-add "vmklive" "/boot/initrd" $KERNELVERSION >>$LOGFILE 2>&1
147+ --force-add "vmklive" ${_args} "/boot/initrd" $KERNELVERSION >>$LOGFILE 2>&1
143148
144149 mv $VOIDHOSTDIR/boot/initrd $BOOT_DIR
145150 cp $VOIDHOSTDIR/boot/vmlinuz-$KERNELVERSION $BOOT_DIR/vmlinuz
@@ -226,14 +231,12 @@ generate_iso_image() { · 80 unmodified lines
226231 -output "$CURDIR/$OUTPUT_FILE" "$IMAGEDIR" >>$LOGFILE 2>&1
227232 }
228233
229−# Required packages in the image for a working system.
230−PACKAGE_LIST="base-system dialog"
231−
232234 #
233235 # main()
234236 #
235−while getopts "r:c:k:l:i:s:o:p:h" opt; do
237+while getopts "b:r:c:k:l:i:s:o:p:h" opt; do
236238 case $opt in
239+ b) BASE_SYSTEM_PKG="$OPTARG";;
237240 r) XBPS_REPOSITORY+="--repository=$OPTARG ";;
238241 c) XBPS_CACHEDIR="--cachedir=$OPTARG";;
239242 k) KEYMAP="$OPTARG";;
@@ -241,7 +244,7 @@ while getopts "r:c:k:l:i:s:o:p:h" opt; do · 1 unmodified line
241244 i) INITRAMFS_COMPRESSION="$OPTARG";;
242245 s) SQUASHFS_COMPRESSION="$OPTARG";;
243246 o) OUTPUT_FILE="$OPTARG";;
244− p) PACKAGE_LIST+=" $OPTARG";;
247+ p) PACKAGE_LIST="$OPTARG";;
245248 h) usage;;
246249 esac
247250 done
@@ -253,6 +256,10 @@ shift $(($OPTIND - 1)) · 5 unmodified lines
253256 : ${LOCALE:=en_US.UTF-8}
254257 : ${INITRAMFS_COMPRESSION:=xz}
255258 : ${SQUASHFS_COMPRESSION:=xz}
259+: ${BASE_SYSTEM_PKG:=base-system}
260+
261+# Required packages in the image for a working system.
262+PACKAGE_LIST="$BASE_SYSTEM_PKG dialog $PACKAGE_LIST"
256263
257264 LOGFILE="$(mktemp -t vmklive-XXXXXXXXXX.log)"
258265

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t