2023-06-14 19:33:40 -07:00
|
|
|
{{- if eq .host.distro.family "linux" -}}
|
2023-01-23 23:54:12 -08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Source: https://github.com/eylles/plymouth-preview/blob/master/plymouth-preview
|
|
|
|
|
|
|
|
## Preview Plymouth Splash ##
|
|
|
|
## by _khAttAm_ ##
|
|
|
|
## www.khattam.info ##
|
|
|
|
## License: GPL v3 ##
|
|
|
|
|
|
|
|
chk_root () {
|
|
|
|
if [ ! $( id -u ) -eq 0 ]; then
|
|
|
|
echo Must be run as root
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
chk_root
|
|
|
|
|
|
|
|
DURATION=$1
|
|
|
|
if [ $# -ne 1 ]; then
|
|
|
|
DURATION=10
|
|
|
|
fi
|
|
|
|
|
|
|
|
plymouthd
|
|
|
|
plymouth --show-splash
|
|
|
|
for ((I=0; I<$DURATION; I++)); do
|
|
|
|
plymouth --update=test$I
|
|
|
|
sleep 1
|
|
|
|
done
|
|
|
|
plymouth quit
|
2023-06-14 19:33:40 -07:00
|
|
|
{{ end -}}
|