Ubuntu Pastebin

Paste from jelly at Wed, 25 May 2016 08:29:30 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Attempt to add missing en_US latin1 locale
if ! locale -a |grep -q '^en_US$'; do
  # half-arsed Ubuntu detection
  if [ -x /usr/bin/lsb_release ] && [ "x$(lsb_release -si)" = "xUbuntu" ]; then
    supd=/var/lib/locales/supported.d/local
    if [ -e $supd ]; then
      if ! grep -q '^en_US.ISO-8859-1' $supd; then
        echo "Appending en_US.ISO-8859-1 to $supd."
        echo 'en_US.ISO-8859-1 ISO8859-1' >> $supd
        do_localegen=1
      else
        echo 'W: en_US.ISO-8859-1 already present in $supd but no en_US in output of "locale -a".'
        echo '   This should not happen.  dsmcad service may misbehave or fail to start!'
      fi
    else
      echo "Creating $supd."
      echo 'en_US.ISO-8859-1 ISO8859-1' > $supd
      do_localegen=1
    fi
  else # assume Debian
  [...]
  fi
fi
Download as text