core/initscripts/initscripts.install

51 lines
1.6 KiB
Plaintext
Raw Normal View History

2011-12-11 07:26:12 +08:00
post_install() {
if [ -f /etc/profile.d/locale,sh ] ; then
rm /etc/profile.d/locale.sh
fi
mv /etc/profile.d/locale.sh.new /etc/profile.d/locale.sh
}
2010-03-13 23:25:19 +08:00
post_upgrade() {
2011-11-02 01:30:00 +08:00
if [ "$(vercmp $2 2011.06.1)" -lt 0 ]; then
echo "Blacklisting of modules is no longer supported in rc.conf,"
echo "please add blacklist entries to /etc/modprobe.d/ instead."
2010-03-13 23:25:19 +08:00
fi
2011-11-02 01:49:02 +08:00
if [ "$(vercmp $2 2011.07.2)" -lt 0 ]; then
echo "VERBOSE= in rc.conf no longer has any effect."
echo "Please append 'quiet' to your kernel command line."
fi
2011-11-02 01:49:02 +08:00
if [ "$(vercmp $2 2011.10.1)" -lt 0 ]; then
echo "If using non-bash-compatible shell, please set LANG in /etc/locale.conf,"
echo "as LOCALE in /etc/rc.conf no longer works."
fi
2011-11-02 15:48:25 +08:00
2011-11-02 16:12:00 +08:00
if [ ! -f /etc/locale.conf ] ; then
rcdata=$(cat /etc/rc.conf | grep "LOCALE=" | grep -v "DAEMON" | cut -d '"' -f2)
if [ "$rcdata" != "" ] ; then
echo "Found old language configuration in /etc/rc.conf"
echo "the file /etc/locale.conf will be configured automatically"
echo "LANG=${rcdata}" > /etc/locale.conf
2011-11-06 04:38:35 +08:00
echo "LC_MESSAGES=${rcdata}" >> /etc/locale.conf
2011-11-02 16:12:00 +08:00
echo " "
fi
2011-11-02 15:48:25 +08:00
fi
2011-11-06 04:38:35 +08:00
if [ -f /etc/locale.conf ] ; then
echo "Found language configuration in /etc/locale.conf"
echo "Please check it:"
echo " "
echo "------------------------------------------------"
cat /etc/locale.conf
echo "------------------------------------------------"
echo " "
fi
2011-11-02 15:48:25 +08:00
if [ -f /etc/profile.d/locale,sh ] ; then
rm /etc/profile.d/locale.sh
fi
mv /etc/profile.d/locale.sh.new /etc/profile.d/locale.sh
2011-11-02 01:30:00 +08:00
}