Update file run_onchange_after_61-plymouth-settings.tmpl
This commit is contained in:
parent
d877c7e765
commit
f79af8f76b
1 changed files with 26 additions and 10 deletions
|
@ -9,6 +9,21 @@ if command -v install-software > /dev/null; then
|
||||||
install-software plymouth
|
install-software plymouth
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
### Create /etc/plymouth/plymouthd.conf
|
||||||
|
if [ -f /etc/plymouth/plymouthd.conf ]; then
|
||||||
|
### Back up original plymouthd.conf
|
||||||
|
if [ ! -f /etc/plymouth/plymouthd.conf.bak ]; then
|
||||||
|
logg info 'Backing up /etc/plymouth/plymouthd.conf to /etc/plymouth/plymouthd.conf.bak'
|
||||||
|
sudo cp -f /etc/plymouth/plymouthd.conf /etc/plymouth/plymouthd.conf.bak
|
||||||
|
fi
|
||||||
|
|
||||||
|
### Create new plymouthd.conf
|
||||||
|
logg info 'Populating the /etc/plymouth/plymouthd.conf file'
|
||||||
|
echo "[Daemon]" | sudo tee /etc/plymouth/plymouthd.conf > /dev/null
|
||||||
|
echo "Theme={{ .theme }}" | sudo tee -a /etc/plymouth/plymouthd.conf > /dev/null
|
||||||
|
echo "ShowDelay=1" | sudo tee -a /etc/plymouth/plymouthd.conf > /dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
### Apply update-alternatives
|
### Apply update-alternatives
|
||||||
if command -v update-alternatives > /dev/null; then
|
if command -v update-alternatives > /dev/null; then
|
||||||
if [ -f "/usr/local/share/plymouth/themes/{{ .theme }}/{{ .theme }}.plymouth" ]; then
|
if [ -f "/usr/local/share/plymouth/themes/{{ .theme }}/{{ .theme }}.plymouth" ]; then
|
||||||
|
@ -25,16 +40,17 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
### Update /etc/plymouth/plymouthd.conf
|
### Update /etc/plymouth/plymouthd.conf
|
||||||
if [ -f /etc/plymouth/plymouthd.conf ]; then
|
# Replaced by code above
|
||||||
logg info 'Setting ShowDelay=1 in /etc/plymouth/plymouthd.conf'
|
# if [ -f /etc/plymouth/plymouthd.conf ]; then
|
||||||
if cat /etc/plymouth/plymouthd.conf | grep ShowDelay; then
|
# logg info 'Setting ShowDelay=1 in /etc/plymouth/plymouthd.conf'
|
||||||
sudo sed -i 's/^ShowDelay=.*/ShowDelay=1/' /etc/plymouth/plymouthd.conf
|
# if cat /etc/plymouth/plymouthd.conf | grep ShowDelay; then
|
||||||
else
|
# sudo sed -i 's/^ShowDelay=.*/ShowDelay=1/' /etc/plymouth/plymouthd.conf
|
||||||
echo 'ShowDelay=1' | sudo tee -a /etc/plymouth/plymouthd.conf > /dev/null
|
# else
|
||||||
fi
|
# echo 'ShowDelay=1' | sudo tee -a /etc/plymouth/plymouthd.conf > /dev/null
|
||||||
else
|
# fi
|
||||||
logg warn '/etc/plymouth/plymouthd.conf does not exist!'
|
# else
|
||||||
fi
|
# logg warn '/etc/plymouth/plymouthd.conf does not exist!'
|
||||||
|
# fi
|
||||||
|
|
||||||
### Symlink /usr/local/share/plymouth/themes to /usr/share/plymouth/themes
|
### Symlink /usr/local/share/plymouth/themes to /usr/share/plymouth/themes
|
||||||
if [ ! -d '/usr/share/plymouth/themes/{{ .theme }}' ]; then
|
if [ ! -d '/usr/share/plymouth/themes/{{ .theme }}' ]; then
|
||||||
|
|
Loading…
Reference in a new issue