File: preinst

package info (click to toggle)
linuxlogo 2.07-1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 296 kB
  • ctags: 73
  • sloc: ansic: 982; sh: 125; makefile: 60
file content (22 lines) | stat: -rw-r--r-- 603 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
set -e

# Removes diversion introduced in v1.06-1
if [ "upgrade" = "$1" ] && \
 echo -n "Checking the current linuxlogo version..." && \
 [ `dpkg -l linuxlogo | grep linuxlogo | awk '{ print $3 }'` = "1.06-1" ] && \
 echo "done."; then
    rm -f /etc/issue && dpkg-divert --package linuxlogo --remove --rename \
    --divert /etc/issue.dist /etc/issue
else
    echo "done."
fi

# Make sure that /etc/issue exists...
if [ ! -f /etc/issue ]; then
 echo -n "Restoring the original /etc/issue..."
 echo "Debian GNU/\s `cat /etc/debian_version`  \n \l" > /etc/issue
 echo "done."
fi

#DEBHELPER#