Move splash image and motd to data/; this way those can be overrided easily.

Close #9
This commit is contained in:
Juan RP 2014-09-18 16:52:28 +02:00
parent 620883f9b2
commit bedab03a6e
3 changed files with 21 additions and 28 deletions

15
data/motd Normal file
View File

@ -0,0 +1,15 @@
###############################################################################
Welcome to the Void Linux Live system, you have been autologged in.
This user has full sudo(8) permissions without any password, be careful
executing commands through sudo(8).
To start the installation please type:
$ sudo void-installer
and follow the on-screen instructions. Thanks for using Void Linux.
http://www.voidlinux.eu
###############################################################################

View File

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 98 KiB

View File

@ -44,28 +44,6 @@ error_out() {
exit 1 exit 1
} }
write_etc_motd() {
cat >> "$ROOTFS/etc/motd" <<_EOF
###############################################################################
Autogenerated by void-mklive "@@MKLIVE_VERSION@@"
###############################################################################
Welcome to the Void Linux Live system, you have been autologged in.
This user has full sudo(8) permissions without any password, be careful
executing commands through sudo(8).
To start the installation please type:
$ sudo void-installer
and follow the on-screen instructions. Thanks for using Void Linux.
http://www.voidlinux.eu
###############################################################################
_EOF
}
usage() { usage() {
cat <<_EOF cat <<_EOF
Usage: $(basename $0) [options] Usage: $(basename $0) [options]
@ -157,9 +135,9 @@ generate_isolinux_boot() {
cp -f $SYSLINUX_DATADIR/libutil.c32 "$ISOLINUX_DIR" cp -f $SYSLINUX_DATADIR/libutil.c32 "$ISOLINUX_DIR"
cp -f $SYSLINUX_DATADIR/chain.c32 "$ISOLINUX_DIR" cp -f $SYSLINUX_DATADIR/chain.c32 "$ISOLINUX_DIR"
cp -f isolinux/isolinux.cfg.in "$ISOLINUX_DIR"/isolinux.cfg cp -f isolinux/isolinux.cfg.in "$ISOLINUX_DIR"/isolinux.cfg
cp -f isolinux/${SPLASH_IMAGE} "$ISOLINUX_DIR" cp -f ${SPLASH_IMAGE} "$ISOLINUX_DIR"
sed -i -e "s|@@SPLASHIMAGE@@|${SPLASH_IMAGE}|" \ sed -i -e "s|@@SPLASHIMAGE@@|$(basename ${SPLASH_IMAGE})|" \
-e "s|@@KERNVER@@|${KERNELVERSION}|" \ -e "s|@@KERNVER@@|${KERNELVERSION}|" \
-e "s|@@KEYMAP@@|${KEYMAP}|" \ -e "s|@@KEYMAP@@|${KEYMAP}|" \
-e "s|@@ARCH@@|$(uname -m)|" \ -e "s|@@ARCH@@|$(uname -m)|" \
@ -169,7 +147,7 @@ generate_isolinux_boot() {
generate_grub_efi_boot() { generate_grub_efi_boot() {
cp -f grub/grub.cfg $GRUB_DIR cp -f grub/grub.cfg $GRUB_DIR
cp -f grub/grub_void.cfg.in $GRUB_DIR/grub_void.cfg cp -f grub/grub_void.cfg.in $GRUB_DIR/grub_void.cfg
sed -i -e "s|@@SPLASHIMAGE@@|${SPLASH_IMAGE}|" \ sed -i -e "s|@@SPLASHIMAGE@@|$(basename ${SPLASH_IMAGE})|" \
-e "s|@@KERNVER@@|${KERNELVERSION}|" \ -e "s|@@KERNVER@@|${KERNELVERSION}|" \
-e "s|@@KEYMAP@@|${KEYMAP}|" \ -e "s|@@KEYMAP@@|${KEYMAP}|" \
-e "s|@@ARCH@@|$(uname -m)|" \ -e "s|@@ARCH@@|$(uname -m)|" \
@ -251,7 +229,7 @@ done
shift $(($OPTIND - 1)) shift $(($OPTIND - 1))
# Set defaults # Set defaults
: ${XBPS_CACHEDIR=--cachedir=/var/cache/xbps} : ${XBPS_CACHEDIR:=--cachedir=/var/cache/xbps}
: ${KEYMAP:=us} : ${KEYMAP:=us}
: ${LOCALE:=en_US.UTF-8} : ${LOCALE:=en_US.UTF-8}
: ${INITRAMFS_COMPRESSION:=xz} : ${INITRAMFS_COMPRESSION:=xz}
@ -288,7 +266,7 @@ ISOLINUX_CFG="$ISOLINUX_DIR/isolinux.cfg"
: ${XBPS_REPOSITORY:=--repository=http://repo.voidlinux.eu/current} : ${XBPS_REPOSITORY:=--repository=http://repo.voidlinux.eu/current}
: ${SYSLINUX_DATADIR:=$VOIDHOSTDIR/usr/share/syslinux} : ${SYSLINUX_DATADIR:=$VOIDHOSTDIR/usr/share/syslinux}
: ${SPLASH_IMAGE:=splash.png} : ${SPLASH_IMAGE:=data/splash.png}
: ${XBPS_INSTALL_CMD:=xbps-install} : ${XBPS_INSTALL_CMD:=xbps-install}
: ${XBPS_REMOVE_CMD:=xbps-remove} : ${XBPS_REMOVE_CMD:=xbps-remove}
: ${XBPS_QUERY_CMD:=xbps-query} : ${XBPS_QUERY_CMD:=xbps-query}
@ -327,7 +305,7 @@ install_packages
# Prepare /etc/motd. # Prepare /etc/motd.
# #
mkdir -p "$ROOTFS"/etc mkdir -p "$ROOTFS"/etc
write_etc_motd [ -s data/motd ] && cp data/motd $ROOTFS/etc
export PATH=$VOIDHOSTDIR/usr/bin:$VOIDHOSTDIR/usr/sbin:$PATH export PATH=$VOIDHOSTDIR/usr/bin:$VOIDHOSTDIR/usr/sbin:$PATH
export LD_LIBRARY_PATH=$VOIDHOSTDIR/usr/lib export LD_LIBRARY_PATH=$VOIDHOSTDIR/usr/lib