Ubuntu Pastebin

Paste from zetheroo at Thu, 17 Sep 2015 12:08:06 +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
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
administrator@mtbuntu:~$ cat /etc/init.d/lwsmd 
#! /bin/sh
#
# Copyright (c) BeyondTrust Software.  All rights reserved.
#
### BEGIN INIT INFO
# Provides: lwsmd
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Start and Stop PBIS Service Manager
### END INIT INFO

PROG_DESC="PBIS Service Manager"
PROG_BIN=/opt/pbis/sbin/lwsmd
PROG_ARGS="--start-as-daemon"
PIDFILE=
SCRIPTNAME="lwsmd"
STARTHOOK="fix_locale"

lookup_user_locale()
{
    . /etc/sysconfig/language
    printf 'LANG=%q; export LANG\n' "$RC_LANG"
    printf 'LC_ALL=%q; export LC_ALL\n' "$RC_LC_ALL"
    printf 'LC_CTYPE=%q; export LC_CTYPE\n' "$RC_LC_CTYPE"
}

fix_locale()
{
    if [ "$LC_ALL" = "POSIX" ]
    then
        unset LC_ALL
        export LC_ALL
    fi
    if type locale >/dev/null &&
        locale | grep LC_CTYPE | grep POSIX >/dev/null; then
        if [ -f /etc/sysconfig/language ]; then
            eval "`lookup_user_locale`"
        elif [ -f /etc/default/locale ]; then
            . /etc/default/locale
            export LANG
        fi
    elif [ -z "$LANG" ]; then
        LANG="en_US.UTF-8"
        export LANG
    fi
}

. /opt/pbis/libexec/init-base.sh
Download as text