-
Notifications
You must be signed in to change notification settings - Fork 7
/
postinstall
executable file
·31 lines (28 loc) · 1.04 KB
/
postinstall
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
#!/bin/bash
if [ "${INSTALLTYPE}" != "rpm" ]; then
echo -e "\n$0: Proceeding with the installation.\n";
if [ ! -e "${gladedir}/autopoweroff.png" ]; then
cd "${gladedir}"
ln -s "../pixmaps/autopoweroff.png" .
cd -
fi
# Comment by Hans Deragon, 2006/09/27, 17:07 EDT
#
# consolehelper will only work if the configuration files for it are
# enabled in /etc. Thus if ${sysconfdir} is not setup to /etc,
# consolehelper will not work and there would be no point installing
# it. When the user will execute it, and error message would show up
# (it is "Unknown error."; not very useful) and useless bug reports
# will be filed in.
#
# This is why we install the consolehelper symlink only if
# ${sysconfdir} is set to /etc.
if [ "${sysconfidr}" = "/etc" -a "${consolehelperpath}" != "not found" ]; then
mkdir -p "${bindir}"
cd "${bindir}"
ln -s "${consolehelperpath}" autopoweroff
fi
fi
# "make" requires that this script exits with '0' if everything went well.
# We make sure here that we quit with "0".
exit 0