Debian Codegraph @

site.example/local/sbin/dphys-config-altern-xcursor

raw
1 #!/bin/sh
2 # /usr/local/sbin/dphys-config-altern-xcursor - set /etc/alternatives/*
3 # author Neil Franklin, last modification 2006.10.12
4 # copyright ETH Zuerich Physics Departement,
5 # use under either modified/non-advertising BSD or GPL license
6
7 # this script is called by dphys-config, once on each install/update
8 # no parameters or env vars for this script
9 # it requires in /etc/dphys-config.list 1 line:
10 # local/sbin/dphys-config-altern-xcursor:/usr/:chmod 755 {}; {}
11
12 # this will only work on Debian, as /etc/alternatives/* is Debian specific
13
14 set -e
15
16 # get ready to work
17 # /usr/local added for FreeBSD, because their ports end up in there
18 PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
19 export PATH
20
21
22 # --- main stuff
23
24 if [ -f /etc/X11/cursors/core.theme ] ; then
25 update-alternatives --set x-cursor-theme /etc/X11/cursors/core.theme
26 else
27 MISSING_PACKAGE=yes
28 fi
29
30
31 # --- avoid problem with not running on install, because packages not yet here
32
33 if [ "${MISSING_PACKAGE}" = yes ] ; then
34 # remove this script to force rerun and reinstall on next dphys-config run
35 # should happen after the reboot directly after installing all packages
36 rm $0
37 # this will actually produce warning from dphys-config, but exit 0 is wrong
38 exit 1
39 fi
40
41
42 # --- finish off
43
44 exit 0