2 # Filename: ${GRML_FAI_CONFIG}/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 ################################################################################
12 if $ROOTCMD update-alternatives --list editor 2>/dev/null | grep -q vim.gtk ; then
13 echo "Setting vim.gtk as editor using update-alternatives."
14 $ROOTCMD update-alternatives --set editor /usr/bin/vim.gtk
15 $ROOTCMD update-alternatives --set vi /usr/bin/vim.gtk
16 $ROOTCMD update-alternatives --set vim /usr/bin/vim.gtk
17 elif $ROOTCMD update-alternatives --list editor 2>/dev/null | grep -q vim.basic ; then
18 echo "Setting vim.basic as editor using update-alternatives."
19 $ROOTCMD update-alternatives --set editor /usr/bin/vim.basic
20 $ROOTCMD update-alternatives --set vi /usr/bin/vim.basic
21 $ROOTCMD update-alternatives --set vim /usr/bin/vim.basic
22 elif $ROOTCMD update-alternatives --list editor 2>/dev/null | grep -q vim.tiny ; then
23 echo "Setting vim.tiny as editor using update-alternatives."
24 $ROOTCMD update-alternatives --set editor /usr/bin/vim.tiny
25 $ROOTCMD update-alternatives --set vi /usr/bin/vim.tiny
27 echo "Warning: No vim binary suitable for update-alternatives found."
30 if $ROOTCMD update-alternatives --list x-terminal-emulator 2>/dev/null | grep -q '/uxterm' ; then
31 echo "Setting uxterm as x-terminal-emulator using update-alternatives."
32 $ROOTCMD update-alternatives --set x-terminal-emulator /usr/bin/uxterm
33 elif $ROOTCMD update-alternatives --list x-terminal-emulator 2>/dev/null | grep -q '/xterm' ; then
34 echo "Setting xterm as x-terminal-emulator using update-alternatives."
35 $ROOTCMD update-alternatives --set x-terminal-emulator /usr/bin/xterm
38 if $ROOTCMD update-alternatives --list x-cursor-theme 2>/dev/null | grep -q '/whiteglass.theme' ; then
39 echo "Setting whiteglass.theme as x-cursor-theme using update-alternatives."
40 $ROOTCMD update-alternatives --set x-cursor-theme /etc/X11/cursors/whiteglass.theme
43 if $ROOTCMD update-alternatives --list x-www-browser 2>/dev/null | grep -q '/iceweasel' ; then
44 echo "Setting iceweasel as x-www-browser using update-alternatives."
45 $ROOTCMD update-alternatives --set x-www-browser /usr/bin/iceweasel
48 if $ROOTCMD update-alternatives --list x-www-browser 2>/dev/null | grep -q '/firefox-esr' ; then
49 echo "Setting firefox-esr as x-www-browser using update-alternatives."
50 $ROOTCMD update-alternatives --set x-www-browser /usr/bin/firefox-esr
53 if $ROOTCMD update-alternatives --list www-browser 2>/dev/null | grep -q '/w3m' ; then
54 echo "Setting w3m as www-browser using update-alternatives."
55 $ROOTCMD update-alternatives --set www-browser /usr/bin/w3m
58 if $ROOTCMD update-alternatives --list x-window-manager 2>/dev/null | grep -q '/wm-ng' ; then
59 echo "Setting wm-ng as x-window-manager using update-alternatives."
60 $ROOTCMD update-alternatives --set x-window-manager /usr/bin/wm-ng
63 # sadly isn't available via update-alternates, anyway - use
64 # ntfs-3g (if available) as default for ntfs
65 if [ -r $target/sbin/mount.ntfs-3g ] || [ -L $target/sbin/mount.ntfs-3g ] ; then
66 $ROOTCMD ln -sf /sbin/mount.ntfs-3g /sbin/mount.ntfs
69 ## END OF FILE #################################################################
70 # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2