MRTestRepo/pephooks/normal/0900-devuan-essentials.hook...

33 lines
1.6 KiB
Bash
Executable File

#!/bin/bash
### Check for building a Devuan system
if [ -e /etc/devuan_version ]
then _plymouthcfg="/usr/share/initramfs-tools/scripts/init-premount/plymouth"
grep -B100 "mkdir -m 0755" ${_plymouthcfg} > ${_plymouthcfg}.new
echo -e "\tudevadm trigger -s graphics" >> ${_plymouthcfg}.new
echo -e "\t udevadm settle" >> ${_plymouthcfg}.new
echo -e '\t[ "$quiet" = "y" ] && reset' >> ${_plymouthcfg}.new
echo -e '\techo "Starting PeppermintOS Devuan"' >> ${_plymouthcfg}.new
grep -A10 "/usr/sbin/plymouthd" ${_plymouthcfg} >> ${_plymouthcfg}.new
echo -e "" >> ${_plymouthcfg}.new
mv ${_plymouthcfg}.new ${_plymouthcfg}
chmod +x ${_plymouthcfg}
# plymouth-set-default-theme futureprototype --rebuild-initrd
fi
### Differentiate the Devuan slides from the Debian slides.
if [ -e /etc/devuan_version ] && [ -e /etc/calamares/branding/peppermint/slides/ ]
then mv /etc/calamares/branding/peppermint/slides/devuan/s*.png /etc/calamares/branding/peppermint/
rm -rf /etc/calamares/branding/peppermint/slides/
elif [ ! -e /etc/devuan_version ] && [ -e /etc/calamares/branding/peppermint/slides/ ]
then mv /etc/calamares/branding/peppermint/slides/debian/s*.png /etc/calamares/branding/peppermint/
rm -rf /etc/calamares/branding/peppermint/slides/
fi
### Because the exit status of this routine was sometimes non "0"
### the script also exits with a non-zero status, crashing debian builds.
### Some Gnome-ish software only looks for machine-id in /etc/
if [ -e /etc/devuan_version ] && [ ! -e /etc/machine-id ]
then ln -s /var/lib/dbus/machine-id /etc/machine-id
fi