aboutsummarylogtreecommitdiffstats
path: root/plymouth-theme-russia.install
blob: 971b93fd900acb30128b886876eed3923f15bae3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Set theme name

name="russia"

post_install() {
    echo
    echo "Установить тему $name для Plymouth"
    echo

    # Смена названия темы в plymouthd.conf
    sed -i -e "s,.*Theme=.*,Theme=$name," /etc/plymouth/plymouthd.conf

    plymouth-set-default-theme -R $name

    echo
    echo "Сделано"
    echo
}

post_upgrade() {
    grep "Theme=$name" /etc/plymouth/plymouthd.conf

    if [ $? -eq 0 ] ; then
        plymouth-set-default-theme -R $name
    fi
}

pre_remove() {
    grep "Theme=$name" /etc/plymouth/plymouthd.conf

    if [ $? -eq 0 ] ; then
        cat << _EOF 
  
==> WARNING: You have removed your current plymouth-theme.
==> Set a different theme with:
==> sudo plymouth-set-default-theme -R <theme-name>
==> or remove Plymouth properly!

_EOF
  fi
}