about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--data/motd15
-rw-r--r--data/splash.png (renamed from isolinux/splash.png)bin100743 -> 100743 bytes
-rw-r--r--mklive.sh.in34
3 files changed, 21 insertions, 28 deletions
diff --git a/data/motd b/data/motd
new file mode 100644
index 0000000..e83e73d
--- /dev/null
+++ b/data/motd
@@ -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
+
+###############################################################################
diff --git a/isolinux/splash.png b/data/splash.png
index 639d2ef..639d2ef 100644
--- a/isolinux/splash.png
+++ b/data/splash.png
Binary files differdiff --git a/mklive.sh.in b/mklive.sh.in
index d5dc545..3a92041 100644
--- a/mklive.sh.in
+++ b/mklive.sh.in
@@ -44,28 +44,6 @@ error_out() {
     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() {
     cat <<_EOF
 Usage: $(basename $0) [options]
@@ -157,9 +135,9 @@ generate_isolinux_boot() {
     cp -f $SYSLINUX_DATADIR/libutil.c32 "$ISOLINUX_DIR"
     cp -f $SYSLINUX_DATADIR/chain.c32 "$ISOLINUX_DIR"
     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|@@KEYMAP@@|${KEYMAP}|" \
         -e "s|@@ARCH@@|$(uname -m)|" \
@@ -169,7 +147,7 @@ generate_isolinux_boot() {
 generate_grub_efi_boot() {
     cp -f grub/grub.cfg $GRUB_DIR
     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|@@KEYMAP@@|${KEYMAP}|" \
         -e "s|@@ARCH@@|$(uname -m)|" \
@@ -251,7 +229,7 @@ done
 shift $(($OPTIND - 1))
 
 # Set defaults
-: ${XBPS_CACHEDIR=--cachedir=/var/cache/xbps}
+: ${XBPS_CACHEDIR:=--cachedir=/var/cache/xbps}
 : ${KEYMAP:=us}
 : ${LOCALE:=en_US.UTF-8}
 : ${INITRAMFS_COMPRESSION:=xz}
@@ -288,7 +266,7 @@ ISOLINUX_CFG="$ISOLINUX_DIR/isolinux.cfg"
 
 : ${XBPS_REPOSITORY:=--repository=http://repo.voidlinux.eu/current}
 : ${SYSLINUX_DATADIR:=$VOIDHOSTDIR/usr/share/syslinux}
-: ${SPLASH_IMAGE:=splash.png}
+: ${SPLASH_IMAGE:=data/splash.png}
 : ${XBPS_INSTALL_CMD:=xbps-install}
 : ${XBPS_REMOVE_CMD:=xbps-remove}
 : ${XBPS_QUERY_CMD:=xbps-query}
@@ -327,7 +305,7 @@ install_packages
 # Prepare /etc/motd.
 #
 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 LD_LIBRARY_PATH=$VOIDHOSTDIR/usr/lib