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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
|
#!/bin/sh -e
##################
# Configuring gom
#
# New install: Install default config, force interactive configuration
# Upgrade : <0.29.99 : Info, force interactive reconfiguration
# : >=0.29.99: Leave configuration alone (a check with
# gomconfig would change mixer settings).
gomconfig=/usr/sbin/gomconfig
#default_cfg="/usr/share/doc/gom/examples/default"
# Policy 11.7.3 (templates)
default_cfg="/usr/share/gom/default"
no_auto_init_old=/etc/gom/NO_AUTO_INIT
if [ "$1" = "configure" ];
then echo
if [ -z "$2" ] || dpkg --compare-versions "$2" lt "0.29.99";
then if [ -z "$2" ];
then echo "New installation of gom."
else echo "Upgrading from ancient version."
echo "Your old configuration (from $2) is not compatible with this new"
echo "version of gom. Unfortunately, there is also no way to automatically"
echo "update it."
echo "I will treat this like a new install needing new configuration."
echo "No old configuration files will be deleted automatically."
echo "However, an option will be presented to you later to scan for obsolete files."
fi
echo
echo -n "Installing default configuration..."
install -d /etc/gom
# Although this is a new install, there might still
# be old conf files --> interactive
cp --interactive ${default_cfg}/* /etc/gom
echo "done."
echo -n "Forcing reconfiguration... [Hit RETURN to continue]"
read dummy
${gomconfig} --force || true
else echo "Upgrading gom."
echo
if [ -e ${no_auto_init_old} ] ;
then echo -n "Removing obsolete file ${no_auto_init_old}..."
rm -f ${no_auto_init_old}
echo "done."
echo
echo "Please edit /etc/default/gom to change this setting."
echo "(Auto-initialization is disabled by default.)"
echo
echo -n "[Hit RETURN to continue]"
read dummy
else echo "Leaving existing configuration alone..."
fi
fi
echo
echo "You can re-run ${gomconfig} [--force] any time later, either"
echo "as root (changing the system configuration) or as normal user."
echo
# Do not wait for keystroke on upgrade
if [ -z "$2" ] || dpkg --compare-versions "$2" lt "0.29.99" ;
then echo -n "[Hit RETURN to continue]"
read dummy
fi
fi
#
# End Configuring gom
######################
# 0.29.99: no gom-c any more (is being removed automatically on upgrade)
update-alternatives --install /usr/bin/gom gom /usr/bin/gom-ct 50
# 0.29.103-2: /etc/modutils/gom
update-modules
#DEBHELPER#
|