This file is indexed.

/usr/share/backup-manager/dbus.sh is in backup-manager 0.7.10.1-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Copyright © 2007 Rached Ben Mustapha
#
# See the AUTHORS file for details.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
#
# The backup-manager's dbus.sh library.
#
# If the dbus utilities are installed, these functions send
# signals on the bus, (system or session one, as appropriate)
# so that other processes on the system can react to backup
# events, and thus increase the hype-level of backup-manager.
#
# These interfaces are still experimental and are subject to
# change.
# 

# Message contents:
# * int32 percentage
# * string label (human-readable string describing what is
#                 currently being done)
PROGRESS_INTERFACE="org.backupmanager.BackupManager.ProgressNotify"

# Message contents:
# * string event_name (one of "startup", "shutdown")
# * string argument (details of the event)
EVENT_INTERFACE="org.backupmanager.BackupManager.EventNotify"

# Message contents:
# * string level (one of debug, info, warning, error)
# * string message (possibly truncated to fit in a dbus message)
LOG_MESSAGE_INTERFACE="org.backupmanager.BackupManager.LogMessageNotify"

SYSTEM_BUS_OBJECT="/org/backupmanager/instance/SystemInstance"
USER_BUS_OBJECT="/org/backupmanager/instance/UserInstance/${USERNAME}"

function bm_dbus_init()
{
    debug "bm_dbus_init()"
    dbus_send=$(which dbus-send 2>/dev/null) || true

    if [ -x "${dbus_send}" ]; then
        if [ "${UID}" = "0" ]; then
            bus_type="system"
            bus_object=${SYSTEM_BUS_OBJECT}
        else
            bus_type="session"
            bus_object=${USER_BUS_OBJECT}
        fi

        dbus_send_cmd="${dbus_send} --${bus_type} --type=signal ${bus_object}"
    else
        dbus_send_cmd=""
    fi
}

function bm_dbus_send_progress()
{
    local percentage label
    percentage=${1}
    label=${2}

    if [ -n "${dbus_send_cmd}" ]; then
        ${dbus_send_cmd} ${PROGRESS_INTERFACE} int32:"${percentage}" string:"${label}" || true
    fi
}

function bm_dbus_send_log_message()
{
    local level message
    level=${1}
    message=${2}

    if [ -n "${dbus_send_cmd}" ]; then
        ${dbus_send_cmd} ${LOG_MESSAGE_INTERFACE} string:"${level}" string:"${message}" || true
    fi
}

function bm_dbus_send_event()
{
    local event_name details
    event_name=${1}
    details=${2}

    if [ -n "${dbus_send_cmd}" ]; then
        ${dbus_send_cmd} ${EVENT_INTERFACE} string:"${event_name}" string:"${details}" || true
    fi
}