2 # Filename: /etc/grml/fai/config/scripts/GRMLBASE/90-update-alternatives
3 # Purpose: set up /etc/alternatives/* according to grml preferences
4 # Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
5 # Bug-Reports: see http://grml.org/bugs/
6 # License: This file is licensed under the GPL v2 or any later version.
7 ################################################################################
13 # Too many people don't expect to get that, so use it only for grml-small
14 # avoid "debug: unbound variable":
16 if ifclass GRML_SMALL ; then
18 if [ -r $target/usr/bin/vim.tiny ] ; then
19 # update-alternates does not work without /usr/share/man because
20 # it configures (in our case non-existent) manpages as well :-/
21 # $ROOTCMD update-alternatives --set editor /usr/bin/vim.tiny
22 # $ROOTCMD update-alternatives --set vi /usr/bin/vim.tiny
23 $ROOTCMD ln -sf /etc/alternatives/editor /usr/bin/editor
24 $ROOTCMD ln -sf /usr/bin/vim.tiny /etc/alternatives/editor
25 $ROOTCMD ln -sf /etc/alternatives/vi /usr/bin/vi
26 $ROOTCMD ln -sf /usr/bin/vim.tiny /etc/alternatives/vi
27 $ROOTCMD ln -sf /etc/alternatives/vim /usr/bin/vim
28 $ROOTCMD ln -sf /usr/bin/vim.tiny /etc/alternatives/vim
29 $ROOTCMD ln -sf /etc/alternatives/view /usr/bin/view
30 $ROOTCMD ln -sf /usr/bin/vim.tiny /etc/alternatives/view
34 if [ -r $target/usr/bin/vim.basic ] ; then
35 $ROOTCMD update-alternatives --set editor /usr/bin/vim.basic
36 $ROOTCMD update-alternatives --set vi /usr/bin/vim.basic
37 $ROOTCMD update-alternatives --set vim /usr/bin/vim.basic
38 $ROOTCMD update-alternatives --set view /usr/bin/vim.basic
41 if [ -r $target/usr/bin/vim.gtk ] ; then
42 $ROOTCMD update-alternatives --set editor /usr/bin/vim.gtk
43 $ROOTCMD update-alternatives --set vi /usr/bin/vim.gtk
44 $ROOTCMD update-alternatives --set vim /usr/bin/vim.gtk
45 $ROOTCMD update-alternatives --set view /usr/bin/vim.gtk
48 if [ -r $target/usr/bin/uxterm ] ; then
49 $ROOTCMD update-alternatives --set x-terminal-emulator /usr/bin/uxterm
50 elif [ -r $target/usr/bin/xterm ] ; then
51 $ROOTCMD update-alternatives --set x-terminal-emulator /usr/bin/xterm
54 if [ -r $target/etc/X11/cursors/whiteglass.theme ] ; then
55 $ROOTCMD update-alternatives --set x-cursor-theme /etc/X11/cursors/whiteglass.theme
58 if [ -r $target/usr/bin/iceweasel ] || [ -L $target/usr/bin/iceweasel ] ; then
59 $ROOTCMD update-alternatives --set x-www-browser /usr/bin/iceweasel
62 if [ -r $target/usr/bin/w3m ] ; then
63 $ROOTCMD update-alternatives --set www-browser /usr/bin/w3m
66 if [ -r $target/usr/bin/wm-ng ] ; then
67 # activate wm-ng only if it is registered as x-window-manager:
68 if $ROOTCMD update-alternatives --list x-window-manager | grep -q wm-ng ; then
69 $ROOTCMD update-alternatives --set x-window-manager /usr/bin/wm-ng
73 # sadly isn't available via update-alternates, anyway - use
74 # ntfs-3g (if available) as default for ntfs
75 if [ -r $target/sbin/mount.ntfs-3g ] || [ -L $target/sbin/mount.ntfs-3g ] ; then
76 $ROOTCMD ln -sf /sbin/mount.ntfs-3g /sbin/mount.ntfs
79 ## END OF FILE #################################################################
80 # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3