diff options
| author | Jonathan Bauer | 2012-12-20 12:49:40 +0100 |
|---|---|---|
| committer | Jonathan Bauer | 2012-12-20 12:49:40 +0100 |
| commit | 70a83bdbdee6b47380e7bc40cc864835bfc79043 (patch) | |
| tree | 6718adad31694362bfcaec86981f52c62acfc3f5 /remote/tools/dbus | |
| parent | commented out agetty noclear option (diff) | |
| download | tm-scripts-70a83bdbdee6b47380e7bc40cc864835bfc79043.tar.gz tm-scripts-70a83bdbdee6b47380e7bc40cc864835bfc79043.tar.xz tm-scripts-70a83bdbdee6b47380e7bc40cc864835bfc79043.zip | |
static unit files for dbus, cleanup
Diffstat (limited to 'remote/tools/dbus')
8 files changed, 30 insertions, 41 deletions
diff --git a/remote/tools/dbus/data/etc/systemd/system/dbus.service b/remote/tools/dbus/data/etc/systemd/system/dbus.service new file mode 100644 index 00000000..5e22c812 --- /dev/null +++ b/remote/tools/dbus/data/etc/systemd/system/dbus.service @@ -0,0 +1,11 @@ +[Unit] +Description=D-Bus System Message Bus +Requires=dbus.socket +After=syslog.target + +[Service] +ExecStartPre=//bin/dbus-uuidgen --ensure +ExecStartPre=-/bin/rm -f /var/run/dbus/pid +ExecStart=//bin/dbus-daemon --system --address=systemd: --nofork --activation=systemd +ExecReload=//bin/dbus-send --print-reply --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig +OOMScoreAdjust=-900 diff --git a/remote/tools/dbus/data/etc/systemd/system/dbus.socket b/remote/tools/dbus/data/etc/systemd/system/dbus.socket new file mode 100644 index 00000000..0303bfbd --- /dev/null +++ b/remote/tools/dbus/data/etc/systemd/system/dbus.socket @@ -0,0 +1,5 @@ +[Unit] +Description=D-Bus System Message Bus Socket + +[Socket] +ListenStream=/var/run/dbus/system_bus_socket diff --git a/remote/tools/dbus/data/etc/systemd/system/dbus.target.wants/dbus.socket b/remote/tools/dbus/data/etc/systemd/system/dbus.target.wants/dbus.socket new file mode 120000 index 00000000..fe02d162 --- /dev/null +++ b/remote/tools/dbus/data/etc/systemd/system/dbus.target.wants/dbus.socket @@ -0,0 +1 @@ +../dbus.socket
\ No newline at end of file diff --git a/remote/tools/dbus/data/etc/systemd/system/multi-user.target.wants/dbus.service b/remote/tools/dbus/data/etc/systemd/system/multi-user.target.wants/dbus.service new file mode 120000 index 00000000..224df24b --- /dev/null +++ b/remote/tools/dbus/data/etc/systemd/system/multi-user.target.wants/dbus.service @@ -0,0 +1 @@ +../dbus.service
\ No newline at end of file diff --git a/remote/tools/dbus/data/etc/systemd/system/sockets.target.wants/dbus.socket b/remote/tools/dbus/data/etc/systemd/system/sockets.target.wants/dbus.socket new file mode 120000 index 00000000..fe02d162 --- /dev/null +++ b/remote/tools/dbus/data/etc/systemd/system/sockets.target.wants/dbus.socket @@ -0,0 +1 @@ +../dbus.socket
\ No newline at end of file diff --git a/remote/tools/dbus/dbus.build b/remote/tools/dbus/dbus.build index 940ba9f6..6c6faaf5 100644 --- a/remote/tools/dbus/dbus.build +++ b/remote/tools/dbus/dbus.build @@ -9,38 +9,25 @@ fetch_source() { } build() { - BUILDDIR=$TOOL_DIR/$TOOL/build + BUILDDIR=${TOOL_DIR}/${TOOL}/build COPYLIST="list_dpkg_output" - [ -e $COPYLIST ] && rm $COPYLIST + [ -e ${COPYLIST} ] && rm ${COPYLIST} for FILE in $(dpkg -L dbus | grep -v share/doc | grep -v share/man) do - [ ! -d $FILE ] && echo $FILE >> $COPYLIST + [ ! -d ${FILE} ] && echo ${FILE} >> ${COPYLIST} done # prepare target dir & copy there - [ ! -d $BUILDDIR ] && mkdir -p $BUILDDIR - tar -cpv $(cat $COPYLIST|sort -u) | tar -xpv -C $BUILDDIR + [ ! -d ${BUILDDIR} ] && mkdir -p ${BUILDDIR} + tar -cpv $(cat ${COPYLIST}|sort -u) | tar -xpv -C ${BUILDDIR} - # fix path: everything in lib/systemd to usr/lib/systemd - cd $BUILDDIR - - TARLIST="list_files_to_fix_prefix" - [ -f $TARLIST ] && rm $TARLIST - - # find files and symlinks with wrong prefix - for FILE in $(find . -type f -o -type l|grep ^./lib/systemd) - do - echo $FILE >> $TARLIST - done - # copy found files to usr/* - [ ! -d $BUILDDIR/usr ] && mkdir -p $BUILDDIR/usr - tar -cpv $(cat $TARLIST|sort -u) | tar -xpv -C $BUILDDIR/usr - # delete original location - rm -rf ./lib/systemd - cd - } post_copy() { - : + # copy static dbus systemd unit files to stage3.2 + SYSTEMDDIR=${INIT_DIR}/etc/systemd/system + [ ! -d ${SYSTEMDDIR} ] && mkdir -p ${SYSTEMDDIR} + cp -r ${TOOL_DIR}/${TOOL}/data/* ${INIT_DIR} + } diff --git a/remote/tools/dbus/dbus.conf b/remote/tools/dbus/dbus.conf index f18d675f..9847862f 100644 --- a/remote/tools/dbus/dbus.conf +++ b/remote/tools/dbus/dbus.conf @@ -4,7 +4,6 @@ REQUIRED_BINARIES=" dbus-cleanup-sockets dbus-monitor dbus-send dbus-daemon-launch-helper" -REQUIRED_DIRECTORIES=" /etc/dbus-1 - /usr/lib/systemd/system" +REQUIRED_DIRECTORIES=" /etc/dbus-1" REQUIRED_FILES=" /etc/default/dbus /etc/init/dbus.conf" diff --git a/remote/tools/dbus/list_dpkg_output b/remote/tools/dbus/list_dpkg_output deleted file mode 100644 index d451e927..00000000 --- a/remote/tools/dbus/list_dpkg_output +++ /dev/null @@ -1,16 +0,0 @@ -/etc/default/dbus -/etc/init/dbus.conf -/etc/dbus-1/system.conf -/etc/dbus-1/session.conf -/bin/dbus-cleanup-sockets -/bin/dbus-daemon -/bin/dbus-uuidgen -/usr/bin/dbus-monitor -/usr/bin/dbus-send -/usr/lib/dbus-1.0/dbus-daemon-launch-helper -/lib/systemd/system/dbus.socket -/lib/systemd/system/dbus.service -/etc/init.d/dbus -/lib/systemd/system/multi-user.target.wants/dbus.service -/lib/systemd/system/dbus.target.wants/dbus.socket -/lib/systemd/system/sockets.target.wants/dbus.socket |
