~ubuntu-branches/ubuntu/wily/ppc64-diag/wily

« back to all changes in this revision

Viewing changes to debian/ppc64-diag.rtas_errd.init

  • Committer: Package Import Robot
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2015-06-04 16:20:46 UTC
  • Revision ID: package-import@ubuntu.com-20150604162046-x5c0e2fkn0xzdjg4
Tags: 2.6.8-0ubuntu2
* debian/ppc64-diag.*.upstart, debian/ppc64-diag.*.init: Fix platform checks,
  so that opal_errd and rtas_errd only start when supported.
* debian/no-upstream-init.patch:
  - fix up the systemd services to not make use of the upstream init scripts,
    and instead start the daemon directly.
  - ship an extra small script to handle system registration, to be used from
    the upstart/systemd/sysv scripts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
# and status_of_proc is working.
36
36
. /lib/lsb/init-functions
37
37
 
 
38
if [ ! -e "/proc/ppc64/rtas/error_log" ]; then
 
39
        PLATFORM=$(awk '/platform/ {print $3}' /proc/cpuinfo)
 
40
        echo "opal_errd daemon is not supported on the $PLATFORM platform"
 
41
        exit 0
 
42
fi
 
43
 
38
44
VERBOSE=yes
39
45
#
40
46
# Function that starts the daemon/service
41
47
#
42
48
do_start()
43
49
{
44
 
        if test ! -d /var/cache/ppc64-diag.registered ; then
45
 
                echo "Registering ppc64-diag with system"
46
 
                rm -f /var/cache/ppc64-diag.registered
47
 
                mkdir -v /var/cache/ppc64-diag.registered
48
 
                /etc/ppc64-diag/ppc64_diag_setup --register
49
 
        fi
 
50
        /usr/sbin/ppc64_diag_register
 
51
 
50
52
        # Return
51
53
        #   0 if daemon has been started
52
54
        #   1 if daemon was already running