Merge lp:~csurbhi/ubuntu/natty/mountall/mountall-stop-timer into lp:ubuntu/natty/mountall

Proposed by Surbhi Palande
Status: Needs review
Proposed branch: lp:~csurbhi/ubuntu/natty/mountall/mountall-stop-timer
Merge into: lp:ubuntu/natty/mountall
Diff against target: 3568 lines (+3066/-60)
25 files modified
Makefile.am (+1/-1)
Makefile.in (+1/-1)
configure (+5/-2)
configure.ac (+4/-2)
dbus/Makefile.am (+4/-0)
dbus/Makefile.in (+62/-11)
dbus/Mountall.Server.conf (+35/-0)
dbus/com.ubuntu.Mountall.Server.xml (+38/-0)
dbus/mountall.h (+49/-0)
debian/changelog (+26/-0)
debian/initramfs/Makefile.am (+4/-0)
debian/initramfs/Makefile.in (+499/-0)
debian/initramfs/mountall (+69/-0)
debian/initramfs/upstart-jobs/Makefile.am (+4/-0)
debian/initramfs/upstart-jobs/Makefile.in (+486/-0)
debian/initramfs/upstart-jobs/mountall.conf (+27/-0)
src/Makefile.am (+25/-6)
src/Makefile.in (+27/-7)
src/control.c (+258/-0)
src/control.h (+36/-0)
src/mountall.c (+270/-30)
src/mountall.h (+24/-0)
util/Makefile.am (+56/-0)
util/Makefile.in (+669/-0)
util/mntctl.c (+387/-0)
To merge this branch: bzr merge lp:~csurbhi/ubuntu/natty/mountall/mountall-stop-timer
Reviewer Review Type Date Requested Status
Colin Watson Needs Fixing
Review via email: mp+57451@code.launchpad.net

Description of the change

mountall provides support to wait for some time for devices to get ready when indicated through fstab with a "timeout" option. In some cases where human interaction is needed for configuring the device, the time that mountall waits may not indicate the time that the system takes in configuring the device. While the human interaction is happening, we may want to stop the timer and then restart it when the human interaction is through.

This patch adds support to start a private mountall server and exposes interfaces to stop and restart a timer if the device mentioned is indeed tagged with a TAG_TIMEOUT. Its upto the client program to appropriately send the device name which matches with what is indicated in /etc/fstab (otherwise the timer will have no effect).

The timer is not restarted with the remaining time, but what was indicated when mountall was started. This is intentionally done because of the fact that the human interaction would anyway change the timeout really and so no client application can really wait on the exact timeout.

Also, right now there is no consideration on authentication between the client and mountall (as the system bus is not involved) However this might need to be done, especially for the case when we are not in the initramfs context.

To post a comment you must log in.
Revision history for this message
Surbhi Palande (csurbhi) wrote :

I guess, this should be a merge request for Ubuntu Oneiric now. Please do consider this for the same. Thanks!

358. By Surbhi Palande

Fixed two errors found while browsing the code: 1) find_mount("/") returns
NULL when / is not found, so cannot access root->mounted. 2) the
information message about the dev_wait_timeout should be printed after
dev_wait_timeout is initialized properly.

359. By Bryce Harrington

Correct grammar on user-visible strings
(LP: #572016)

Revision history for this message
Colin Watson (cjwatson) wrote :

+ <allow send_destination="com.ubuntu.Mountall.Server"
+ send_interface="com.ubuntu.Mountall0_1.Server"
+ send_type="method_call" send_member="StopTimer" />
+ <allow send_destination="com.ubuntu.Mountall.Server"
+ send_interface="com.ubuntu.Mountall0_1.Server"
+ send_type="method_call" send_member="RestartTimers" />
+
+ <allow send_destination="com.ubuntu.Mountall.Server"
+ send_interface="com.ubuntu.Mountall0_1.Server.Job"
+ send_type="method_call" send_member="ChangeMountDevice" />

These methods should be root-only; just removing them from <policy context="default"> should be good enough.

+ <allow send_destination="com.ubuntu.Mountall.Server"
+ send_interface="com.ubuntu.Mountall0_1.Server.Job"

Remove ".Job".

+ <method name="RestartTimer">
+ <arg name="devname" type="s" direction="in" />
+ </method>

This is called RestartTimers in the .conf file. Which is correct?

Also, the .conf file has an entry for GetMountDevices, but that is missing from the .xml file.

- --package=$(PACAKGE) \
+ --package=$(PACKAGE) \

Thanks for fixing this, but there's another (probably copied-and-pasted) occurrence of $(PACAKGE) below. Could you fix that too?

=== added file 'src/control.c'
--- src/control.c 1970-01-01 00:00:00 +0000
+++ src/control.c 2011-06-30 18:09:32 +0000
@@ -0,0 +1,253 @@
+/* mountall
+ *
+ * Copyright © 2010 Canonical Ltd.
+ * Author: Surbhi A. Palande <email address hidden>

This is substantially copied from Upstart. That's fine - they're both copyright Canonical with the same licence, but it'd be good form to acknowledge Scott's co-authorship.

Otherwise I'm happy with this on visual inspection.

review: Needs Fixing
360. By Surbhi Palande

Added com.ubuntu.Mountall.server interface. Implemented the mntctl command
with 4 commands: 1. StopTimer 2. RestartTimer 3. ChangeMountDevice 4.
Version.

Revision history for this message
Surbhi Palande (csurbhi) wrote :

Hi Colin,

Thanks a lot for the review. I have made the suggested changes and also added one more change:
a) for installing the dbus/Mountall.Server to the correct dir: /etc/dbus-1/system.d
in the dbus/Makefile.am

Please do let me know if this looks alright to you.

Warm Regards,
Surbhi.

Revision history for this message
Surbhi Palande (csurbhi) wrote :

Hi Colin,

And I forgot to mention that I have also remove the upstart job responsible for stopping and restarting the timer before and after cryptsetup job respectively for now. I will add that soon here!

Warm Regards,
Surbhi.

361. By Surbhi Palande

Fixed the coding style bugs in the "timeout" option related code. Also
removed a break from the is_device_ready () to get the "device-not-ready"
event for all the devices which are marked with the timeout option and
which are not ready by the time the timer expires.

362. By Surbhi Palande

Added debian/initramfs/Makefile.am to install mountall.initramfs-hook as
an initramfs hook that installs mntctl, mountall and other files needed by
an event driven initramfs. Also added
debian/initramfs/upstart-jobs/Makefile.am to install the upstart-jobs
related to mountall in the event driven initramfs. The current
mountall.conf execute as an upstart job in place of the "local" script in
the non-event driven initramfs

363. By Surbhi Palande

Changed the tag from maverick to oneiric

364. By Surbhi Palande

Added the missing debian/initramfs/upstart-jobs/Makefile.am for installing the
upstart jobs related to the functioning of the event driven initramfs

365. By Surbhi Palande

Fixed the installation of upstart jobs to event-driven dir in the
/usr/share/initramfs-tools/event-driven/

366. By Surbhi Palande

Changed the default mountall hook name to mountall.

367. By Surbhi Palande

Changed the DATA hook to SCRIPT hook to preserve the +x flag on the mountall
hook for initramfs.

368. By Surbhi Palande

Removed the previously added term_handler for the following reasons:
1) You need to disconnect from the dbus_server and unref it only once.
This must happen when mountall finishes mounting all the filesystems. If
mountall is terminated before that then this would be because of an
erroroneous condition on which you want to shut down and so restarting the
mountall Server would not be necessary.

369. By Surbhi Palande

Disconnect from the dbus server only if it was successfully connected
previously

370. By Surbhi Palande

Changed the interface to stop/restart timers to use a mountpoint rather than
the device name. This is useful in situations where the device mentioned in
/etc/fstab is not the device used for mounting because of the change mount
device interface. The mountpoint remains constant in all cases and is also
easier to use that specifying a device with uuids for eg.

371. By Surbhi Palande

Review fixes

372. By Surbhi Palande

Removed the destination for copy_exec and the unnecessary echoes

373. By Surbhi Palande

Added the shell execution exclamation mark to the mountall script

Unmerged revisions

373. By Surbhi Palande

Added the shell execution exclamation mark to the mountall script

372. By Surbhi Palande

Removed the destination for copy_exec and the unnecessary echoes

371. By Surbhi Palande

Review fixes

370. By Surbhi Palande

Changed the interface to stop/restart timers to use a mountpoint rather than
the device name. This is useful in situations where the device mentioned in
/etc/fstab is not the device used for mounting because of the change mount
device interface. The mountpoint remains constant in all cases and is also
easier to use that specifying a device with uuids for eg.

369. By Surbhi Palande

Disconnect from the dbus server only if it was successfully connected
previously

368. By Surbhi Palande

Removed the previously added term_handler for the following reasons:
1) You need to disconnect from the dbus_server and unref it only once.
This must happen when mountall finishes mounting all the filesystems. If
mountall is terminated before that then this would be because of an
erroroneous condition on which you want to shut down and so restarting the
mountall Server would not be necessary.

367. By Surbhi Palande

Changed the DATA hook to SCRIPT hook to preserve the +x flag on the mountall
hook for initramfs.

366. By Surbhi Palande

Changed the default mountall hook name to mountall.

365. By Surbhi Palande

Fixed the installation of upstart jobs to event-driven dir in the
/usr/share/initramfs-tools/event-driven/

364. By Surbhi Palande

Added the missing debian/initramfs/upstart-jobs/Makefile.am for installing the
upstart jobs related to the functioning of the event driven initramfs

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile.am'
2--- Makefile.am 2009-11-29 20:02:43 +0000
3+++ Makefile.am 2011-07-15 11:51:33 +0000
4@@ -1,6 +1,6 @@
5 ## Process this file with automake to produce Makefile.in
6
7-SUBDIRS = intl dbus src conf man po
8+SUBDIRS = intl dbus util src conf debian/initramfs debian/initramfs/upstart-jobs/ man po
9
10 EXTRA_DIST = config.rpath
11
12
13=== modified file 'Makefile.in'
14--- Makefile.in 2011-03-01 21:34:04 +0000
15+++ Makefile.in 2011-07-15 11:51:33 +0000
16@@ -301,7 +301,7 @@
17 top_build_prefix = @top_build_prefix@
18 top_builddir = @top_builddir@
19 top_srcdir = @top_srcdir@
20-SUBDIRS = intl dbus src conf man po
21+SUBDIRS = intl dbus util src conf debian/initramfs debian/initramfs/upstart-jobs/ man po
22 EXTRA_DIST = config.rpath
23 ACLOCAL_AMFLAGS = --install -I m4
24 all: config.h
25
26=== modified file 'configure'
27--- configure 2011-04-13 12:59:22 +0000
28+++ configure 2011-07-15 11:51:33 +0000
29@@ -708,7 +708,7 @@
30 PACKAGE_BUGREPORT='ubuntu-devel@lists.ubuntu.com'
31 PACKAGE_URL=''
32
33-ac_unique_file="src/mountall.c"
34+ac_unique_file="util/mntctl.c"
35 # Factoring default headers for most tests.
36 ac_includes_default="\
37 #include <stdio.h>
38@@ -17545,7 +17545,7 @@
39
40
41
42-ac_config_files="$ac_config_files Makefile intl/Makefile dbus/Makefile src/Makefile conf/Makefile man/Makefile po/Makefile.in"
43+ac_config_files="$ac_config_files Makefile intl/Makefile dbus/Makefile src/Makefile conf/Makefile util/Makefile man/Makefile po/Makefile.in debian/initramfs/Makefile debian/initramfs/upstart-jobs/Makefile"
44
45 ac_config_headers="$ac_config_headers config.h"
46
47@@ -18540,8 +18540,11 @@
48 "dbus/Makefile") CONFIG_FILES="$CONFIG_FILES dbus/Makefile" ;;
49 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
50 "conf/Makefile") CONFIG_FILES="$CONFIG_FILES conf/Makefile" ;;
51+ "util/Makefile") CONFIG_FILES="$CONFIG_FILES util/Makefile" ;;
52 "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
53 "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
54+ "debian/initramfs/Makefile") CONFIG_FILES="$CONFIG_FILES debian/initramfs/Makefile" ;;
55+ "debian/initramfs/upstart-jobs/Makefile") CONFIG_FILES="$CONFIG_FILES debian/initramfs/upstart-jobs/Makefile" ;;
56 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
57
58 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
59
60=== modified file 'configure.ac'
61--- configure.ac 2011-04-13 12:59:22 +0000
62+++ configure.ac 2011-07-15 11:51:33 +0000
63@@ -3,7 +3,7 @@
64 AC_PREREQ(2.62)
65 AC_INIT([mountall], [2.26], [ubuntu-devel@lists.ubuntu.com])
66 AC_COPYRIGHT([[Copyright © 2010 Canonical Ltd.]])
67-AC_CONFIG_SRCDIR([src/mountall.c])
68+AC_CONFIG_SRCDIR([util/mntctl.c])
69 AC_CONFIG_MACRO_DIR([m4])
70
71 AC_GNU_SOURCE
72@@ -49,6 +49,8 @@
73
74 AC_CONFIG_FILES([ Makefile intl/Makefile
75 dbus/Makefile src/Makefile conf/Makefile
76- man/Makefile po/Makefile.in ])
77+ util/Makefile man/Makefile po/Makefile.in
78+ debian/initramfs/Makefile
79+ debian/initramfs/upstart-jobs/Makefile])
80 AC_CONFIG_HEADERS([config.h])
81 AC_OUTPUT
82
83=== modified file 'dbus/Makefile.am'
84--- dbus/Makefile.am 2009-09-14 22:31:57 +0000
85+++ dbus/Makefile.am 2011-07-15 11:51:33 +0000
86@@ -1,5 +1,9 @@
87 ## Process this file with automake to produce Makefile.in
88
89+
90+dbus_configdir = $(sysconfdir)/dbus-1/system.d
91+dist_dbus_config_DATA = Mountall.Server.conf
92+
93 EXTRA_DIST = \
94 upstart.h \
95 com.ubuntu.Upstart.xml
96
97=== modified file 'dbus/Makefile.in'
98--- dbus/Makefile.in 2011-03-01 21:34:04 +0000
99+++ dbus/Makefile.in 2011-07-15 11:51:33 +0000
100@@ -14,6 +14,7 @@
101 # PARTICULAR PURPOSE.
102
103 @SET_MAKE@
104+
105 VPATH = @srcdir@
106 pkgdatadir = $(datadir)/@PACKAGE@
107 pkgincludedir = $(includedir)/@PACKAGE@
108@@ -34,7 +35,8 @@
109 build_triplet = @build@
110 host_triplet = @host@
111 subdir = dbus
112-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
113+DIST_COMMON = $(dist_dbus_config_DATA) $(srcdir)/Makefile.am \
114+ $(srcdir)/Makefile.in
115 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
116 am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
117 $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc2.m4 \
118@@ -70,6 +72,29 @@
119 am__v_at_0 = @
120 SOURCES =
121 DIST_SOURCES =
122+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
123+am__vpath_adj = case $$p in \
124+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
125+ *) f=$$p;; \
126+ esac;
127+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
128+am__install_max = 40
129+am__nobase_strip_setup = \
130+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
131+am__nobase_strip = \
132+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
133+am__nobase_list = $(am__nobase_strip_setup); \
134+ for p in $$list; do echo "$$p $$p"; done | \
135+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
136+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
137+ if (++n[$$2] == $(am__install_max)) \
138+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
139+ END { for (dir in files) print dir, files[dir] }'
140+am__base_list = \
141+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
142+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
143+am__installdirs = "$(DESTDIR)$(dbus_configdir)"
144+DATA = $(dist_dbus_config_DATA)
145 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
146 ACLOCAL = @ACLOCAL@
147 ALLOCA = @ALLOCA@
148@@ -245,6 +270,8 @@
149 top_build_prefix = @top_build_prefix@
150 top_builddir = @top_builddir@
151 top_srcdir = @top_srcdir@
152+dbus_configdir = $(sysconfdir)/dbus-1/system.d
153+dist_dbus_config_DATA = Mountall.Server.conf
154 EXTRA_DIST = \
155 upstart.h \
156 com.ubuntu.Upstart.xml
157@@ -288,6 +315,26 @@
158
159 clean-libtool:
160 -rm -rf .libs _libs
161+install-dist_dbus_configDATA: $(dist_dbus_config_DATA)
162+ @$(NORMAL_INSTALL)
163+ test -z "$(dbus_configdir)" || $(MKDIR_P) "$(DESTDIR)$(dbus_configdir)"
164+ @list='$(dist_dbus_config_DATA)'; test -n "$(dbus_configdir)" || list=; \
165+ for p in $$list; do \
166+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
167+ echo "$$d$$p"; \
168+ done | $(am__base_list) | \
169+ while read files; do \
170+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dbus_configdir)'"; \
171+ $(INSTALL_DATA) $$files "$(DESTDIR)$(dbus_configdir)" || exit $$?; \
172+ done
173+
174+uninstall-dist_dbus_configDATA:
175+ @$(NORMAL_UNINSTALL)
176+ @list='$(dist_dbus_config_DATA)'; test -n "$(dbus_configdir)" || list=; \
177+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
178+ test -n "$$files" || exit 0; \
179+ echo " ( cd '$(DESTDIR)$(dbus_configdir)' && rm -f" $$files ")"; \
180+ cd "$(DESTDIR)$(dbus_configdir)" && rm -f $$files
181 tags: TAGS
182 TAGS:
183
184@@ -327,8 +374,11 @@
185 done
186 check-am: all-am
187 check: check-am
188-all-am: Makefile
189+all-am: Makefile $(DATA)
190 installdirs:
191+ for dir in "$(DESTDIR)$(dbus_configdir)"; do \
192+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
193+ done
194 install: install-am
195 install-exec: install-exec-am
196 install-data: install-data-am
197@@ -374,7 +424,7 @@
198
199 info-am:
200
201-install-data-am:
202+install-data-am: install-dist_dbus_configDATA
203
204 install-dvi: install-dvi-am
205
206@@ -418,20 +468,21 @@
207
208 ps-am:
209
210-uninstall-am:
211+uninstall-am: uninstall-dist_dbus_configDATA
212
213 .MAKE: install-am install-strip
214
215 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
216 distclean distclean-generic distclean-libtool distdir dvi \
217 dvi-am html html-am info info-am install install-am \
218- install-data install-data-am install-dvi install-dvi-am \
219- install-exec install-exec-am install-html install-html-am \
220- install-info install-info-am install-man install-pdf \
221- install-pdf-am install-ps install-ps-am install-strip \
222- installcheck installcheck-am installdirs maintainer-clean \
223- maintainer-clean-generic mostlyclean mostlyclean-generic \
224- mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
225+ install-data install-data-am install-dist_dbus_configDATA \
226+ install-dvi install-dvi-am install-exec install-exec-am \
227+ install-html install-html-am install-info install-info-am \
228+ install-man install-pdf install-pdf-am install-ps \
229+ install-ps-am install-strip installcheck installcheck-am \
230+ installdirs maintainer-clean maintainer-clean-generic \
231+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
232+ ps ps-am uninstall uninstall-am uninstall-dist_dbus_configDATA
233
234
235 # Tell versions [3.59,3.63) of GNU make to not export all variables.
236
237=== added file 'dbus/Mountall.Server.conf'
238--- dbus/Mountall.Server.conf 1970-01-01 00:00:00 +0000
239+++ dbus/Mountall.Server.conf 2011-07-15 11:51:33 +0000
240@@ -0,0 +1,35 @@
241+<?xml version="1.0" encoding="UTF-8" ?>
242+<!DOCTYPE busconfig PUBLIC
243+ "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
244+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
245+
246+<busconfig>
247+ <!-- Only the root user can own the Mountall name -->
248+ <policy user="root">
249+ <allow own="com.ubuntu.Mountall.Server" />
250+ </policy>
251+
252+ <!-- Permit the root user to invoke all of the methods on Mountall-->
253+ <policy user="root">
254+ <allow send_destination="com.ubuntu.Mountall.Server"
255+ send_interface="org.freedesktop.DBus.Properties" />
256+
257+ <allow send_destination="com.ubuntu.Mountall.Server"
258+ send_interface="com.ubuntu.Mountall0_1.Server" />
259+ </policy>
260+
261+ <!-- Allow any user to introspect Mountall's interfaces, to obtain the
262+ values of properties (but not set them) and to invoke selected
263+ methods on Mountall that are used to walk information. -->
264+ <policy context="default">
265+ <allow send_destination="com.ubuntu.Mountall.Server"
266+ send_interface="org.freedesktop.DBus.Introspectable" />
267+
268+ <allow send_destination="com.ubuntu.Mountall.Server"
269+ send_interface="org.freedesktop.DBus.Properties"
270+ send_type="method_call" send_member="Get" />
271+ <allow send_destination="com.ubuntu.Mountall.Server"
272+ send_interface="org.freedesktop.DBus.Properties"
273+ send_type="method_call" send_member="GetAll" />
274+ </policy>
275+</busconfig>
276
277=== added file 'dbus/com.ubuntu.Mountall.Server.xml'
278--- dbus/com.ubuntu.Mountall.Server.xml 1970-01-01 00:00:00 +0000
279+++ dbus/com.ubuntu.Mountall.Server.xml 2011-07-15 11:51:33 +0000
280@@ -0,0 +1,38 @@
281+<?xml version="1.0" encoding="UTF-8" ?>
282+<!-- mountall
283+
284+ com.ubuntu.Mountall.Server.xml - interface definition for Mountall Server
285+
286+ Copyright © 2011 Canonical Ltd.
287+
288+ This file is free software; Canonical Ltd gives unlimited permission
289+ to copy and/or distribute it, with or without modifications, as long
290+ as this notice is preserved.
291+
292+ Communication and interaction with Mountall through this interface is
293+ permitted without restriction.
294+ -->
295+
296+<!DOCTYPE node PUBLIC
297+ "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
298+ "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
299+
300+<node>
301+ <interface name="com.ubuntu.Mountall0_1.Server">
302+ <method name="StopTimer">
303+ <arg name="mountpoint" type="s" direction="in" />
304+ </method>
305+
306+ <method name="RestartTimer">
307+ <arg name="mountpoint" type="s" direction="in" />
308+ </method>
309+
310+ <method name="ChangeMountDevice">
311+ <arg name="devname" type="s" direction="in" />
312+ <arg name="path" type="s" direction="in" />
313+ </method>
314+
315+ <!-- Basic information about Mountall-->
316+ <property name="version" type="s" access="read" />
317+ </interface>
318+</node>
319
320=== added file 'dbus/mountall.h'
321--- dbus/mountall.h 1970-01-01 00:00:00 +0000
322+++ dbus/mountall.h 2011-07-15 11:51:33 +0000
323@@ -0,0 +1,49 @@
324+/* mountall.h
325+ *
326+ * Copyright © 2009 Canonical Ltd.
327+ *
328+ * This program is free software; you can redistribute it and/or modify
329+ * it under the terms of the GNU General Public License version 2, as
330+ * published by the Free Software Foundation.
331+ *
332+ * This program is distributed in the hope that it will be useful,
333+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
334+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
335+ * GNU General Public License for more details.
336+ *
337+ * You should have received a copy of the GNU General Public License along
338+ * with this program; if not, write to the Free Software Foundation, Inc.,
339+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
340+ */
341+
342+#ifndef DBUS_MNTALL_H
343+#define DBUS_MNTALL_H
344+
345+/**
346+ * DBUS_PATH_MNTALL:
347+ *
348+ * The object path used by the manager object, and used as the root path
349+ * for all other objects.
350+ **/
351+#define DBUS_PATH_MNTALL "/com/ubuntu/Mountall/Server"
352+
353+
354+/**
355+ * DBUS_INTERFACE_MNTALL:
356+ *
357+ * The interface exported by the manager object.
358+ **/
359+#define DBUS_INTERFACE_MNTALL "com.ubuntu.Mountall0_1.Server"
360+
361+/**
362+ * DBUS_ADDRESS_MNTALL:
363+ *
364+ * The address where the private D-Bus server inside Mountall can be
365+ * found.
366+ **/
367+#ifndef DBUS_ADDRESS_MNTALL
368+#define DBUS_ADDRESS_MNTALL "unix:abstract=/com/ubuntu/mountall/server/"
369+#endif
370+
371+
372+#endif /* DBUS_MNTALL_H */
373
374=== modified file 'debian/changelog'
375--- debian/changelog 2011-04-13 12:59:22 +0000
376+++ debian/changelog 2011-07-15 11:51:33 +0000
377@@ -1,3 +1,29 @@
378+mountall (2.27) UNRELEASED; urgency=low
379+
380+ * Added com.ubuntu.Mountall.server interface. Implemented the mntctl command
381+ with 4 commands: 1. StopTimer 2. RestartTimer 3. ChangeMountDevice 4.
382+ Version.
383+ * Fixed the coding style bugs in the "timeout" option related code. Also
384+ removed a break from the is_device_ready () to get the "device-not-ready"
385+ event for all the devices which are marked with the timeout option and
386+ which are not ready by the time the timer expires.
387+ * Added debian/initramfs/Makefile.am to install mountall.initramfs-hook as
388+ an initramfs hook that installs mntctl, mountall and other files needed by
389+ an event driven initramfs. Also added
390+ debian/initramfs/upstart-jobs/Makefile.am to install the upstart-jobs
391+ related to mountall in the event driven initramfs. The current
392+ mountall.conf execute as an upstart job in place of the "local" script in
393+ the non-event driven initramfs
394+
395+ -- Surbhi Palande <surbhi.palande@canonical.com> Wed, 29 Jun 2011 16:40:01 +0300
396+
397+mountall (2.26) oneiric; urgency=low
398+
399+ * Correct grammar on user-visible strings
400+ (LP: #572016)
401+
402+ -- Bryce Harrington <bryce@ubuntu.com> Tue, 07 Jun 2011 12:16:22 -0700
403+
404 mountall (2.25ubuntu1) natty; urgency=low
405
406 * Fixed two errors found while browsing the code: 1) find_mount("/") returns
407
408=== added directory 'debian/initramfs'
409=== added file 'debian/initramfs/Makefile.am'
410--- debian/initramfs/Makefile.am 1970-01-01 00:00:00 +0000
411+++ debian/initramfs/Makefile.am 2011-07-15 11:51:33 +0000
412@@ -0,0 +1,4 @@
413+## Process this file with automake to produce Makefile.in
414+
415+initramfshookdir = /usr/share/initramfs-tools/hooks
416+initramfshook_SCRIPTS = mountall
417
418=== added file 'debian/initramfs/Makefile.in'
419--- debian/initramfs/Makefile.in 1970-01-01 00:00:00 +0000
420+++ debian/initramfs/Makefile.in 2011-07-15 11:51:33 +0000
421@@ -0,0 +1,499 @@
422+# Makefile.in generated by automake 1.11.1 from Makefile.am.
423+# @configure_input@
424+
425+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
426+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
427+# Inc.
428+# This Makefile.in is free software; the Free Software Foundation
429+# gives unlimited permission to copy and/or distribute it,
430+# with or without modifications, as long as this notice is preserved.
431+
432+# This program is distributed in the hope that it will be useful,
433+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
434+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
435+# PARTICULAR PURPOSE.
436+
437+@SET_MAKE@
438+
439+VPATH = @srcdir@
440+pkgdatadir = $(datadir)/@PACKAGE@
441+pkgincludedir = $(includedir)/@PACKAGE@
442+pkglibdir = $(libdir)/@PACKAGE@
443+pkglibexecdir = $(libexecdir)/@PACKAGE@
444+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
445+install_sh_DATA = $(install_sh) -c -m 644
446+install_sh_PROGRAM = $(install_sh) -c
447+install_sh_SCRIPT = $(install_sh) -c
448+INSTALL_HEADER = $(INSTALL_DATA)
449+transform = $(program_transform_name)
450+NORMAL_INSTALL = :
451+PRE_INSTALL = :
452+POST_INSTALL = :
453+NORMAL_UNINSTALL = :
454+PRE_UNINSTALL = :
455+POST_UNINSTALL = :
456+build_triplet = @build@
457+host_triplet = @host@
458+subdir = debian/initramfs
459+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
460+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
461+am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
462+ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc2.m4 \
463+ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \
464+ $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intl.m4 \
465+ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax.m4 \
466+ $(top_srcdir)/m4/inttypes-pri.m4 \
467+ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \
468+ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
469+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libnih.m4 \
470+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/lock.m4 \
471+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \
472+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
473+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
474+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \
475+ $(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \
476+ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \
477+ $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \
478+ $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/m4/wchar_t.m4 \
479+ $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \
480+ $(top_srcdir)/configure.ac
481+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
482+ $(ACLOCAL_M4)
483+mkinstalldirs = $(install_sh) -d
484+CONFIG_HEADER = $(top_builddir)/config.h
485+CONFIG_CLEAN_FILES =
486+CONFIG_CLEAN_VPATH_FILES =
487+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
488+am__vpath_adj = case $$p in \
489+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
490+ *) f=$$p;; \
491+ esac;
492+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
493+am__install_max = 40
494+am__nobase_strip_setup = \
495+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
496+am__nobase_strip = \
497+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
498+am__nobase_list = $(am__nobase_strip_setup); \
499+ for p in $$list; do echo "$$p $$p"; done | \
500+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
501+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
502+ if (++n[$$2] == $(am__install_max)) \
503+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
504+ END { for (dir in files) print dir, files[dir] }'
505+am__base_list = \
506+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
507+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
508+am__installdirs = "$(DESTDIR)$(initramfshookdir)"
509+SCRIPTS = $(initramfshook_SCRIPTS)
510+AM_V_GEN = $(am__v_GEN_$(V))
511+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
512+am__v_GEN_0 = @echo " GEN " $@;
513+AM_V_at = $(am__v_at_$(V))
514+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
515+am__v_at_0 = @
516+SOURCES =
517+DIST_SOURCES =
518+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
519+ACLOCAL = @ACLOCAL@
520+ALLOCA = @ALLOCA@
521+AMTAR = @AMTAR@
522+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
523+AR = @AR@
524+AUTOCONF = @AUTOCONF@
525+AUTOHEADER = @AUTOHEADER@
526+AUTOMAKE = @AUTOMAKE@
527+AWK = @AWK@
528+BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
529+CATOBJEXT = @CATOBJEXT@
530+CC = @CC@
531+CCDEPMODE = @CCDEPMODE@
532+CFLAGS = @CFLAGS@
533+CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
534+CPP = @CPP@
535+CPPFLAGS = @CPPFLAGS@
536+CYGPATH_W = @CYGPATH_W@
537+DATADIRNAME = @DATADIRNAME@
538+DBUS_CFLAGS = @DBUS_CFLAGS@
539+DBUS_LIBS = @DBUS_LIBS@
540+DEFS = @DEFS@
541+DEPDIR = @DEPDIR@
542+DSYMUTIL = @DSYMUTIL@
543+DUMPBIN = @DUMPBIN@
544+ECHO_C = @ECHO_C@
545+ECHO_N = @ECHO_N@
546+ECHO_T = @ECHO_T@
547+EGREP = @EGREP@
548+EXEEXT = @EXEEXT@
549+FGREP = @FGREP@
550+GENCAT = @GENCAT@
551+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
552+GLIBC2 = @GLIBC2@
553+GLIBC21 = @GLIBC21@
554+GMSGFMT = @GMSGFMT@
555+GMSGFMT_015 = @GMSGFMT_015@
556+GREP = @GREP@
557+HAVE_ASPRINTF = @HAVE_ASPRINTF@
558+HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
559+HAVE_SNPRINTF = @HAVE_SNPRINTF@
560+HAVE_VISIBILITY = @HAVE_VISIBILITY@
561+HAVE_WPRINTF = @HAVE_WPRINTF@
562+INSTALL = @INSTALL@
563+INSTALL_DATA = @INSTALL_DATA@
564+INSTALL_PROGRAM = @INSTALL_PROGRAM@
565+INSTALL_SCRIPT = @INSTALL_SCRIPT@
566+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
567+INSTOBJEXT = @INSTOBJEXT@
568+INTLBISON = @INTLBISON@
569+INTLLIBS = @INTLLIBS@
570+INTLOBJS = @INTLOBJS@
571+INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
572+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
573+LD = @LD@
574+LDFLAGS = @LDFLAGS@
575+LIBICONV = @LIBICONV@
576+LIBINTL = @LIBINTL@
577+LIBMULTITHREAD = @LIBMULTITHREAD@
578+LIBOBJS = @LIBOBJS@
579+LIBPTH = @LIBPTH@
580+LIBPTH_PREFIX = @LIBPTH_PREFIX@
581+LIBS = @LIBS@
582+LIBTHREAD = @LIBTHREAD@
583+LIBTOOL = @LIBTOOL@
584+LIPO = @LIPO@
585+LN_S = @LN_S@
586+LTLIBC = @LTLIBC@
587+LTLIBICONV = @LTLIBICONV@
588+LTLIBINTL = @LTLIBINTL@
589+LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
590+LTLIBOBJS = @LTLIBOBJS@
591+LTLIBPTH = @LTLIBPTH@
592+LTLIBTHREAD = @LTLIBTHREAD@
593+MAINT = @MAINT@
594+MAKEINFO = @MAKEINFO@
595+MKDIR_P = @MKDIR_P@
596+MSGFMT = @MSGFMT@
597+MSGFMT_015 = @MSGFMT_015@
598+MSGMERGE = @MSGMERGE@
599+NIH_CFLAGS = @NIH_CFLAGS@
600+NIH_DBUS_CFLAGS = @NIH_DBUS_CFLAGS@
601+NIH_DBUS_LIBS = @NIH_DBUS_LIBS@
602+NIH_DBUS_TOOL = @NIH_DBUS_TOOL@
603+NIH_LIBS = @NIH_LIBS@
604+NM = @NM@
605+NMEDIT = @NMEDIT@
606+OBJDUMP = @OBJDUMP@
607+OBJEXT = @OBJEXT@
608+OTOOL = @OTOOL@
609+OTOOL64 = @OTOOL64@
610+PACKAGE = @PACKAGE@
611+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
612+PACKAGE_NAME = @PACKAGE_NAME@
613+PACKAGE_STRING = @PACKAGE_STRING@
614+PACKAGE_TARNAME = @PACKAGE_TARNAME@
615+PACKAGE_URL = @PACKAGE_URL@
616+PACKAGE_VERSION = @PACKAGE_VERSION@
617+PATH_SEPARATOR = @PATH_SEPARATOR@
618+PKG_CONFIG = @PKG_CONFIG@
619+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
620+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
621+PLYMOUTH_CFLAGS = @PLYMOUTH_CFLAGS@
622+PLYMOUTH_LIBS = @PLYMOUTH_LIBS@
623+POSUB = @POSUB@
624+PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
625+RANLIB = @RANLIB@
626+SED = @SED@
627+SET_MAKE = @SET_MAKE@
628+SHELL = @SHELL@
629+STRIP = @STRIP@
630+UDEV_CFLAGS = @UDEV_CFLAGS@
631+UDEV_LIBS = @UDEV_LIBS@
632+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
633+USE_NLS = @USE_NLS@
634+VERSION = @VERSION@
635+WINDRES = @WINDRES@
636+WOE32 = @WOE32@
637+WOE32DLL = @WOE32DLL@
638+XGETTEXT = @XGETTEXT@
639+XGETTEXT_015 = @XGETTEXT_015@
640+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
641+abs_builddir = @abs_builddir@
642+abs_srcdir = @abs_srcdir@
643+abs_top_builddir = @abs_top_builddir@
644+abs_top_srcdir = @abs_top_srcdir@
645+ac_ct_CC = @ac_ct_CC@
646+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
647+am__include = @am__include@
648+am__leading_dot = @am__leading_dot@
649+am__quote = @am__quote@
650+am__tar = @am__tar@
651+am__untar = @am__untar@
652+bindir = @bindir@
653+build = @build@
654+build_alias = @build_alias@
655+build_cpu = @build_cpu@
656+build_os = @build_os@
657+build_vendor = @build_vendor@
658+builddir = @builddir@
659+datadir = @datadir@
660+datarootdir = @datarootdir@
661+docdir = @docdir@
662+dvidir = @dvidir@
663+exec_prefix = @exec_prefix@
664+host = @host@
665+host_alias = @host_alias@
666+host_cpu = @host_cpu@
667+host_os = @host_os@
668+host_vendor = @host_vendor@
669+htmldir = @htmldir@
670+includedir = @includedir@
671+infodir = @infodir@
672+install_sh = @install_sh@
673+libdir = @libdir@
674+libexecdir = @libexecdir@
675+localedir = @localedir@
676+localstatedir = @localstatedir@
677+lt_ECHO = @lt_ECHO@
678+mandir = @mandir@
679+mkdir_p = @mkdir_p@
680+oldincludedir = @oldincludedir@
681+pdfdir = @pdfdir@
682+prefix = @prefix@
683+program_transform_name = @program_transform_name@
684+psdir = @psdir@
685+sbindir = @sbindir@
686+sharedstatedir = @sharedstatedir@
687+srcdir = @srcdir@
688+sysconfdir = @sysconfdir@
689+target_alias = @target_alias@
690+top_build_prefix = @top_build_prefix@
691+top_builddir = @top_builddir@
692+top_srcdir = @top_srcdir@
693+initramfshookdir = /usr/share/initramfs-tools/hooks
694+initramfshook_SCRIPTS = mountall
695+all: all-am
696+
697+.SUFFIXES:
698+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
699+ @for dep in $?; do \
700+ case '$(am__configure_deps)' in \
701+ *$$dep*) \
702+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
703+ && { if test -f $@; then exit 0; else break; fi; }; \
704+ exit 1;; \
705+ esac; \
706+ done; \
707+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign debian/initramfs/Makefile'; \
708+ $(am__cd) $(top_srcdir) && \
709+ $(AUTOMAKE) --foreign debian/initramfs/Makefile
710+.PRECIOUS: Makefile
711+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
712+ @case '$?' in \
713+ *config.status*) \
714+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
715+ *) \
716+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
717+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
718+ esac;
719+
720+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
721+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
722+
723+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
724+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
725+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
726+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
727+$(am__aclocal_m4_deps):
728+install-initramfshookSCRIPTS: $(initramfshook_SCRIPTS)
729+ @$(NORMAL_INSTALL)
730+ test -z "$(initramfshookdir)" || $(MKDIR_P) "$(DESTDIR)$(initramfshookdir)"
731+ @list='$(initramfshook_SCRIPTS)'; test -n "$(initramfshookdir)" || list=; \
732+ for p in $$list; do \
733+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
734+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
735+ done | \
736+ sed -e 'p;s,.*/,,;n' \
737+ -e 'h;s|.*|.|' \
738+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
739+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
740+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
741+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
742+ if (++n[d] == $(am__install_max)) { \
743+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
744+ else { print "f", d "/" $$4, $$1 } } \
745+ END { for (d in files) print "f", d, files[d] }' | \
746+ while read type dir files; do \
747+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
748+ test -z "$$files" || { \
749+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(initramfshookdir)$$dir'"; \
750+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(initramfshookdir)$$dir" || exit $$?; \
751+ } \
752+ ; done
753+
754+uninstall-initramfshookSCRIPTS:
755+ @$(NORMAL_UNINSTALL)
756+ @list='$(initramfshook_SCRIPTS)'; test -n "$(initramfshookdir)" || exit 0; \
757+ files=`for p in $$list; do echo "$$p"; done | \
758+ sed -e 's,.*/,,;$(transform)'`; \
759+ test -n "$$list" || exit 0; \
760+ echo " ( cd '$(DESTDIR)$(initramfshookdir)' && rm -f" $$files ")"; \
761+ cd "$(DESTDIR)$(initramfshookdir)" && rm -f $$files
762+
763+mostlyclean-libtool:
764+ -rm -f *.lo
765+
766+clean-libtool:
767+ -rm -rf .libs _libs
768+tags: TAGS
769+TAGS:
770+
771+ctags: CTAGS
772+CTAGS:
773+
774+
775+distdir: $(DISTFILES)
776+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
777+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
778+ list='$(DISTFILES)'; \
779+ dist_files=`for file in $$list; do echo $$file; done | \
780+ sed -e "s|^$$srcdirstrip/||;t" \
781+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
782+ case $$dist_files in \
783+ */*) $(MKDIR_P) `echo "$$dist_files" | \
784+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
785+ sort -u` ;; \
786+ esac; \
787+ for file in $$dist_files; do \
788+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
789+ if test -d $$d/$$file; then \
790+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
791+ if test -d "$(distdir)/$$file"; then \
792+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
793+ fi; \
794+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
795+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
796+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
797+ fi; \
798+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
799+ else \
800+ test -f "$(distdir)/$$file" \
801+ || cp -p $$d/$$file "$(distdir)/$$file" \
802+ || exit 1; \
803+ fi; \
804+ done
805+check-am: all-am
806+check: check-am
807+all-am: Makefile $(SCRIPTS)
808+installdirs:
809+ for dir in "$(DESTDIR)$(initramfshookdir)"; do \
810+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
811+ done
812+install: install-am
813+install-exec: install-exec-am
814+install-data: install-data-am
815+uninstall: uninstall-am
816+
817+install-am: all-am
818+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
819+
820+installcheck: installcheck-am
821+install-strip:
822+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
823+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
824+ `test -z '$(STRIP)' || \
825+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
826+mostlyclean-generic:
827+
828+clean-generic:
829+
830+distclean-generic:
831+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
832+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
833+
834+maintainer-clean-generic:
835+ @echo "This command is intended for maintainers to use"
836+ @echo "it deletes files that may require special tools to rebuild."
837+clean: clean-am
838+
839+clean-am: clean-generic clean-libtool mostlyclean-am
840+
841+distclean: distclean-am
842+ -rm -f Makefile
843+distclean-am: clean-am distclean-generic
844+
845+dvi: dvi-am
846+
847+dvi-am:
848+
849+html: html-am
850+
851+html-am:
852+
853+info: info-am
854+
855+info-am:
856+
857+install-data-am: install-initramfshookSCRIPTS
858+
859+install-dvi: install-dvi-am
860+
861+install-dvi-am:
862+
863+install-exec-am:
864+
865+install-html: install-html-am
866+
867+install-html-am:
868+
869+install-info: install-info-am
870+
871+install-info-am:
872+
873+install-man:
874+
875+install-pdf: install-pdf-am
876+
877+install-pdf-am:
878+
879+install-ps: install-ps-am
880+
881+install-ps-am:
882+
883+installcheck-am:
884+
885+maintainer-clean: maintainer-clean-am
886+ -rm -f Makefile
887+maintainer-clean-am: distclean-am maintainer-clean-generic
888+
889+mostlyclean: mostlyclean-am
890+
891+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
892+
893+pdf: pdf-am
894+
895+pdf-am:
896+
897+ps: ps-am
898+
899+ps-am:
900+
901+uninstall-am: uninstall-initramfshookSCRIPTS
902+
903+.MAKE: install-am install-strip
904+
905+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
906+ distclean distclean-generic distclean-libtool distdir dvi \
907+ dvi-am html html-am info info-am install install-am \
908+ install-data install-data-am install-dvi install-dvi-am \
909+ install-exec install-exec-am install-html install-html-am \
910+ install-info install-info-am install-initramfshookSCRIPTS \
911+ install-man install-pdf install-pdf-am install-ps \
912+ install-ps-am install-strip installcheck installcheck-am \
913+ installdirs maintainer-clean maintainer-clean-generic \
914+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
915+ ps ps-am uninstall uninstall-am uninstall-initramfshookSCRIPTS
916+
917+
918+# Tell versions [3.59,3.63) of GNU make to not export all variables.
919+# Otherwise a system limit (for SysV at least) may be exceeded.
920+.NOEXPORT:
921
922=== added file 'debian/initramfs/mountall'
923--- debian/initramfs/mountall 1970-01-01 00:00:00 +0000
924+++ debian/initramfs/mountall 2011-07-15 11:51:33 +0000
925@@ -0,0 +1,69 @@
926+#!/bin/sh -e
927+#event-driven initramfs hook for mountall
928+
929+PREREQ=""
930+
931+#Output prequisites
932+prereqs()
933+{
934+ echo "$PREREQ"
935+}
936+
937+if [ -z "$INITRAMFS_EVENT_DRIVEN" ]; then
938+ exit 0;
939+fi
940+
941+case $1 in
942+ prereqs)
943+ prereqs
944+ exit 0
945+ ;;
946+esac
947+
948+. /usr/share/initramfs-tools/hook-functions
949+
950+copy_exec /sbin/mountall
951+copy_exec /sbin/mntctl
952+mkdir -p ${DESTDIR}/lib/init/
953+mkdir -p ${DESTDIR}/etc/dbus-1/system.d/
954+cp /etc/dbus-1/system.d/Mountall.Server.conf ${DESTDIR}/etc/dbus-1/system.d/
955+
956+# Following is needed for mountall authentication with dbus
957+cp /etc/passwd ${DESTDIR}/etc/
958+if ! grep -q '^root:' ${DESTDIR}/etc/passwd 2>/dev/null; then
959+ echo 'root:x:0:0:root:/root:/bin/sh' >> ${DESTDIR}/etc/passwd
960+fi
961+# we use our own nsswitch - used for mountall authentication with dbus
962+# this is our dummy nss stack - uses libnss_files.so
963+
964+echo 'passwd: files' >${DESTDIR}/etc/nsswitch.conf
965+echo 'group: files' >>${DESTDIR}/etc/nsswitch.conf
966+
967+libnss_compat=`dpkg -L libc6 | grep libnss_compat.so.2`
968+if [ -f $libnss_compat ]; then
969+ cp -uv $libnss_compat ${DESTDIR}/lib/libnss_compat.so.2
970+else
971+ echo "libnss_compat.so.2 not found"
972+ echo "warning: mountall would not be able to connect to upstart"
973+ exit 1
974+fi
975+
976+libnss_files=`dpkg -L libc6 | grep libnss_files.so.2`
977+if [ -f $libnss_files ]; then
978+ cp -uv $libnss_files ${DESTDIR}/lib/libnss_files.so.2
979+else
980+ echo "libnss_files.so.2 not found"
981+ echo "warning: mountall would not be able to connect to upstart"
982+ exit 1
983+fi
984+
985+libuuid=`dpkg -L libuuid1 | grep "libuuid.so.1$"`
986+if [ -f $libuuid ]; then
987+ cp -uv $libuuid ${DESTDIR}/lib/libuuid.so.1
988+else
989+ echo "libuuid.so.1 not found"
990+ echo "warning: root device may not be discovered if uuid is used in fstab"
991+ exit 1
992+fi
993+
994+cp /etc/blkid.conf ${DESTDIR}/etc/
995
996=== added directory 'debian/initramfs/upstart-jobs'
997=== added file 'debian/initramfs/upstart-jobs/Makefile.am'
998--- debian/initramfs/upstart-jobs/Makefile.am 1970-01-01 00:00:00 +0000
999+++ debian/initramfs/upstart-jobs/Makefile.am 2011-07-15 11:51:33 +0000
1000@@ -0,0 +1,4 @@
1001+## Process this file with automake to produce Makefile.in
1002+
1003+upstart_jobs_initramfs_configdir = /usr/share/initramfs-tools/event-driven/upstart-jobs/
1004+upstart_jobs_initramfs_config_DATA = mountall.conf
1005
1006=== added file 'debian/initramfs/upstart-jobs/Makefile.in'
1007--- debian/initramfs/upstart-jobs/Makefile.in 1970-01-01 00:00:00 +0000
1008+++ debian/initramfs/upstart-jobs/Makefile.in 2011-07-15 11:51:33 +0000
1009@@ -0,0 +1,486 @@
1010+# Makefile.in generated by automake 1.11.1 from Makefile.am.
1011+# @configure_input@
1012+
1013+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
1014+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
1015+# Inc.
1016+# This Makefile.in is free software; the Free Software Foundation
1017+# gives unlimited permission to copy and/or distribute it,
1018+# with or without modifications, as long as this notice is preserved.
1019+
1020+# This program is distributed in the hope that it will be useful,
1021+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
1022+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
1023+# PARTICULAR PURPOSE.
1024+
1025+@SET_MAKE@
1026+
1027+VPATH = @srcdir@
1028+pkgdatadir = $(datadir)/@PACKAGE@
1029+pkgincludedir = $(includedir)/@PACKAGE@
1030+pkglibdir = $(libdir)/@PACKAGE@
1031+pkglibexecdir = $(libexecdir)/@PACKAGE@
1032+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
1033+install_sh_DATA = $(install_sh) -c -m 644
1034+install_sh_PROGRAM = $(install_sh) -c
1035+install_sh_SCRIPT = $(install_sh) -c
1036+INSTALL_HEADER = $(INSTALL_DATA)
1037+transform = $(program_transform_name)
1038+NORMAL_INSTALL = :
1039+PRE_INSTALL = :
1040+POST_INSTALL = :
1041+NORMAL_UNINSTALL = :
1042+PRE_UNINSTALL = :
1043+POST_UNINSTALL = :
1044+build_triplet = @build@
1045+host_triplet = @host@
1046+subdir = debian/initramfs/upstart-jobs
1047+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
1048+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
1049+am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
1050+ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc2.m4 \
1051+ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \
1052+ $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intl.m4 \
1053+ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax.m4 \
1054+ $(top_srcdir)/m4/inttypes-pri.m4 \
1055+ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \
1056+ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
1057+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libnih.m4 \
1058+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/lock.m4 \
1059+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \
1060+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
1061+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
1062+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \
1063+ $(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \
1064+ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \
1065+ $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \
1066+ $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/m4/wchar_t.m4 \
1067+ $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \
1068+ $(top_srcdir)/configure.ac
1069+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
1070+ $(ACLOCAL_M4)
1071+mkinstalldirs = $(install_sh) -d
1072+CONFIG_HEADER = $(top_builddir)/config.h
1073+CONFIG_CLEAN_FILES =
1074+CONFIG_CLEAN_VPATH_FILES =
1075+AM_V_GEN = $(am__v_GEN_$(V))
1076+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
1077+am__v_GEN_0 = @echo " GEN " $@;
1078+AM_V_at = $(am__v_at_$(V))
1079+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
1080+am__v_at_0 = @
1081+SOURCES =
1082+DIST_SOURCES =
1083+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
1084+am__vpath_adj = case $$p in \
1085+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
1086+ *) f=$$p;; \
1087+ esac;
1088+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
1089+am__install_max = 40
1090+am__nobase_strip_setup = \
1091+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
1092+am__nobase_strip = \
1093+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
1094+am__nobase_list = $(am__nobase_strip_setup); \
1095+ for p in $$list; do echo "$$p $$p"; done | \
1096+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
1097+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
1098+ if (++n[$$2] == $(am__install_max)) \
1099+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
1100+ END { for (dir in files) print dir, files[dir] }'
1101+am__base_list = \
1102+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
1103+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
1104+am__installdirs = "$(DESTDIR)$(upstart_jobs_initramfs_configdir)"
1105+DATA = $(upstart_jobs_initramfs_config_DATA)
1106+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
1107+ACLOCAL = @ACLOCAL@
1108+ALLOCA = @ALLOCA@
1109+AMTAR = @AMTAR@
1110+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
1111+AR = @AR@
1112+AUTOCONF = @AUTOCONF@
1113+AUTOHEADER = @AUTOHEADER@
1114+AUTOMAKE = @AUTOMAKE@
1115+AWK = @AWK@
1116+BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
1117+CATOBJEXT = @CATOBJEXT@
1118+CC = @CC@
1119+CCDEPMODE = @CCDEPMODE@
1120+CFLAGS = @CFLAGS@
1121+CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
1122+CPP = @CPP@
1123+CPPFLAGS = @CPPFLAGS@
1124+CYGPATH_W = @CYGPATH_W@
1125+DATADIRNAME = @DATADIRNAME@
1126+DBUS_CFLAGS = @DBUS_CFLAGS@
1127+DBUS_LIBS = @DBUS_LIBS@
1128+DEFS = @DEFS@
1129+DEPDIR = @DEPDIR@
1130+DSYMUTIL = @DSYMUTIL@
1131+DUMPBIN = @DUMPBIN@
1132+ECHO_C = @ECHO_C@
1133+ECHO_N = @ECHO_N@
1134+ECHO_T = @ECHO_T@
1135+EGREP = @EGREP@
1136+EXEEXT = @EXEEXT@
1137+FGREP = @FGREP@
1138+GENCAT = @GENCAT@
1139+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
1140+GLIBC2 = @GLIBC2@
1141+GLIBC21 = @GLIBC21@
1142+GMSGFMT = @GMSGFMT@
1143+GMSGFMT_015 = @GMSGFMT_015@
1144+GREP = @GREP@
1145+HAVE_ASPRINTF = @HAVE_ASPRINTF@
1146+HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
1147+HAVE_SNPRINTF = @HAVE_SNPRINTF@
1148+HAVE_VISIBILITY = @HAVE_VISIBILITY@
1149+HAVE_WPRINTF = @HAVE_WPRINTF@
1150+INSTALL = @INSTALL@
1151+INSTALL_DATA = @INSTALL_DATA@
1152+INSTALL_PROGRAM = @INSTALL_PROGRAM@
1153+INSTALL_SCRIPT = @INSTALL_SCRIPT@
1154+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
1155+INSTOBJEXT = @INSTOBJEXT@
1156+INTLBISON = @INTLBISON@
1157+INTLLIBS = @INTLLIBS@
1158+INTLOBJS = @INTLOBJS@
1159+INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
1160+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
1161+LD = @LD@
1162+LDFLAGS = @LDFLAGS@
1163+LIBICONV = @LIBICONV@
1164+LIBINTL = @LIBINTL@
1165+LIBMULTITHREAD = @LIBMULTITHREAD@
1166+LIBOBJS = @LIBOBJS@
1167+LIBPTH = @LIBPTH@
1168+LIBPTH_PREFIX = @LIBPTH_PREFIX@
1169+LIBS = @LIBS@
1170+LIBTHREAD = @LIBTHREAD@
1171+LIBTOOL = @LIBTOOL@
1172+LIPO = @LIPO@
1173+LN_S = @LN_S@
1174+LTLIBC = @LTLIBC@
1175+LTLIBICONV = @LTLIBICONV@
1176+LTLIBINTL = @LTLIBINTL@
1177+LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
1178+LTLIBOBJS = @LTLIBOBJS@
1179+LTLIBPTH = @LTLIBPTH@
1180+LTLIBTHREAD = @LTLIBTHREAD@
1181+MAINT = @MAINT@
1182+MAKEINFO = @MAKEINFO@
1183+MKDIR_P = @MKDIR_P@
1184+MSGFMT = @MSGFMT@
1185+MSGFMT_015 = @MSGFMT_015@
1186+MSGMERGE = @MSGMERGE@
1187+NIH_CFLAGS = @NIH_CFLAGS@
1188+NIH_DBUS_CFLAGS = @NIH_DBUS_CFLAGS@
1189+NIH_DBUS_LIBS = @NIH_DBUS_LIBS@
1190+NIH_DBUS_TOOL = @NIH_DBUS_TOOL@
1191+NIH_LIBS = @NIH_LIBS@
1192+NM = @NM@
1193+NMEDIT = @NMEDIT@
1194+OBJDUMP = @OBJDUMP@
1195+OBJEXT = @OBJEXT@
1196+OTOOL = @OTOOL@
1197+OTOOL64 = @OTOOL64@
1198+PACKAGE = @PACKAGE@
1199+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
1200+PACKAGE_NAME = @PACKAGE_NAME@
1201+PACKAGE_STRING = @PACKAGE_STRING@
1202+PACKAGE_TARNAME = @PACKAGE_TARNAME@
1203+PACKAGE_URL = @PACKAGE_URL@
1204+PACKAGE_VERSION = @PACKAGE_VERSION@
1205+PATH_SEPARATOR = @PATH_SEPARATOR@
1206+PKG_CONFIG = @PKG_CONFIG@
1207+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
1208+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
1209+PLYMOUTH_CFLAGS = @PLYMOUTH_CFLAGS@
1210+PLYMOUTH_LIBS = @PLYMOUTH_LIBS@
1211+POSUB = @POSUB@
1212+PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
1213+RANLIB = @RANLIB@
1214+SED = @SED@
1215+SET_MAKE = @SET_MAKE@
1216+SHELL = @SHELL@
1217+STRIP = @STRIP@
1218+UDEV_CFLAGS = @UDEV_CFLAGS@
1219+UDEV_LIBS = @UDEV_LIBS@
1220+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
1221+USE_NLS = @USE_NLS@
1222+VERSION = @VERSION@
1223+WINDRES = @WINDRES@
1224+WOE32 = @WOE32@
1225+WOE32DLL = @WOE32DLL@
1226+XGETTEXT = @XGETTEXT@
1227+XGETTEXT_015 = @XGETTEXT_015@
1228+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
1229+abs_builddir = @abs_builddir@
1230+abs_srcdir = @abs_srcdir@
1231+abs_top_builddir = @abs_top_builddir@
1232+abs_top_srcdir = @abs_top_srcdir@
1233+ac_ct_CC = @ac_ct_CC@
1234+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
1235+am__include = @am__include@
1236+am__leading_dot = @am__leading_dot@
1237+am__quote = @am__quote@
1238+am__tar = @am__tar@
1239+am__untar = @am__untar@
1240+bindir = @bindir@
1241+build = @build@
1242+build_alias = @build_alias@
1243+build_cpu = @build_cpu@
1244+build_os = @build_os@
1245+build_vendor = @build_vendor@
1246+builddir = @builddir@
1247+datadir = @datadir@
1248+datarootdir = @datarootdir@
1249+docdir = @docdir@
1250+dvidir = @dvidir@
1251+exec_prefix = @exec_prefix@
1252+host = @host@
1253+host_alias = @host_alias@
1254+host_cpu = @host_cpu@
1255+host_os = @host_os@
1256+host_vendor = @host_vendor@
1257+htmldir = @htmldir@
1258+includedir = @includedir@
1259+infodir = @infodir@
1260+install_sh = @install_sh@
1261+libdir = @libdir@
1262+libexecdir = @libexecdir@
1263+localedir = @localedir@
1264+localstatedir = @localstatedir@
1265+lt_ECHO = @lt_ECHO@
1266+mandir = @mandir@
1267+mkdir_p = @mkdir_p@
1268+oldincludedir = @oldincludedir@
1269+pdfdir = @pdfdir@
1270+prefix = @prefix@
1271+program_transform_name = @program_transform_name@
1272+psdir = @psdir@
1273+sbindir = @sbindir@
1274+sharedstatedir = @sharedstatedir@
1275+srcdir = @srcdir@
1276+sysconfdir = @sysconfdir@
1277+target_alias = @target_alias@
1278+top_build_prefix = @top_build_prefix@
1279+top_builddir = @top_builddir@
1280+top_srcdir = @top_srcdir@
1281+upstart_jobs_initramfs_configdir = /usr/share/initramfs-tools/event-driven/upstart-jobs/
1282+upstart_jobs_initramfs_config_DATA = mountall.conf
1283+all: all-am
1284+
1285+.SUFFIXES:
1286+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
1287+ @for dep in $?; do \
1288+ case '$(am__configure_deps)' in \
1289+ *$$dep*) \
1290+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
1291+ && { if test -f $@; then exit 0; else break; fi; }; \
1292+ exit 1;; \
1293+ esac; \
1294+ done; \
1295+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign debian/initramfs/upstart-jobs/Makefile'; \
1296+ $(am__cd) $(top_srcdir) && \
1297+ $(AUTOMAKE) --foreign debian/initramfs/upstart-jobs/Makefile
1298+.PRECIOUS: Makefile
1299+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
1300+ @case '$?' in \
1301+ *config.status*) \
1302+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
1303+ *) \
1304+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
1305+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
1306+ esac;
1307+
1308+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
1309+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
1310+
1311+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
1312+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
1313+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
1314+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
1315+$(am__aclocal_m4_deps):
1316+
1317+mostlyclean-libtool:
1318+ -rm -f *.lo
1319+
1320+clean-libtool:
1321+ -rm -rf .libs _libs
1322+install-upstart_jobs_initramfs_configDATA: $(upstart_jobs_initramfs_config_DATA)
1323+ @$(NORMAL_INSTALL)
1324+ test -z "$(upstart_jobs_initramfs_configdir)" || $(MKDIR_P) "$(DESTDIR)$(upstart_jobs_initramfs_configdir)"
1325+ @list='$(upstart_jobs_initramfs_config_DATA)'; test -n "$(upstart_jobs_initramfs_configdir)" || list=; \
1326+ for p in $$list; do \
1327+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
1328+ echo "$$d$$p"; \
1329+ done | $(am__base_list) | \
1330+ while read files; do \
1331+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(upstart_jobs_initramfs_configdir)'"; \
1332+ $(INSTALL_DATA) $$files "$(DESTDIR)$(upstart_jobs_initramfs_configdir)" || exit $$?; \
1333+ done
1334+
1335+uninstall-upstart_jobs_initramfs_configDATA:
1336+ @$(NORMAL_UNINSTALL)
1337+ @list='$(upstart_jobs_initramfs_config_DATA)'; test -n "$(upstart_jobs_initramfs_configdir)" || list=; \
1338+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
1339+ test -n "$$files" || exit 0; \
1340+ echo " ( cd '$(DESTDIR)$(upstart_jobs_initramfs_configdir)' && rm -f" $$files ")"; \
1341+ cd "$(DESTDIR)$(upstart_jobs_initramfs_configdir)" && rm -f $$files
1342+tags: TAGS
1343+TAGS:
1344+
1345+ctags: CTAGS
1346+CTAGS:
1347+
1348+
1349+distdir: $(DISTFILES)
1350+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
1351+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
1352+ list='$(DISTFILES)'; \
1353+ dist_files=`for file in $$list; do echo $$file; done | \
1354+ sed -e "s|^$$srcdirstrip/||;t" \
1355+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
1356+ case $$dist_files in \
1357+ */*) $(MKDIR_P) `echo "$$dist_files" | \
1358+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
1359+ sort -u` ;; \
1360+ esac; \
1361+ for file in $$dist_files; do \
1362+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
1363+ if test -d $$d/$$file; then \
1364+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
1365+ if test -d "$(distdir)/$$file"; then \
1366+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
1367+ fi; \
1368+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
1369+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
1370+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
1371+ fi; \
1372+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
1373+ else \
1374+ test -f "$(distdir)/$$file" \
1375+ || cp -p $$d/$$file "$(distdir)/$$file" \
1376+ || exit 1; \
1377+ fi; \
1378+ done
1379+check-am: all-am
1380+check: check-am
1381+all-am: Makefile $(DATA)
1382+installdirs:
1383+ for dir in "$(DESTDIR)$(upstart_jobs_initramfs_configdir)"; do \
1384+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
1385+ done
1386+install: install-am
1387+install-exec: install-exec-am
1388+install-data: install-data-am
1389+uninstall: uninstall-am
1390+
1391+install-am: all-am
1392+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
1393+
1394+installcheck: installcheck-am
1395+install-strip:
1396+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
1397+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
1398+ `test -z '$(STRIP)' || \
1399+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
1400+mostlyclean-generic:
1401+
1402+clean-generic:
1403+
1404+distclean-generic:
1405+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
1406+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
1407+
1408+maintainer-clean-generic:
1409+ @echo "This command is intended for maintainers to use"
1410+ @echo "it deletes files that may require special tools to rebuild."
1411+clean: clean-am
1412+
1413+clean-am: clean-generic clean-libtool mostlyclean-am
1414+
1415+distclean: distclean-am
1416+ -rm -f Makefile
1417+distclean-am: clean-am distclean-generic
1418+
1419+dvi: dvi-am
1420+
1421+dvi-am:
1422+
1423+html: html-am
1424+
1425+html-am:
1426+
1427+info: info-am
1428+
1429+info-am:
1430+
1431+install-data-am: install-upstart_jobs_initramfs_configDATA
1432+
1433+install-dvi: install-dvi-am
1434+
1435+install-dvi-am:
1436+
1437+install-exec-am:
1438+
1439+install-html: install-html-am
1440+
1441+install-html-am:
1442+
1443+install-info: install-info-am
1444+
1445+install-info-am:
1446+
1447+install-man:
1448+
1449+install-pdf: install-pdf-am
1450+
1451+install-pdf-am:
1452+
1453+install-ps: install-ps-am
1454+
1455+install-ps-am:
1456+
1457+installcheck-am:
1458+
1459+maintainer-clean: maintainer-clean-am
1460+ -rm -f Makefile
1461+maintainer-clean-am: distclean-am maintainer-clean-generic
1462+
1463+mostlyclean: mostlyclean-am
1464+
1465+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
1466+
1467+pdf: pdf-am
1468+
1469+pdf-am:
1470+
1471+ps: ps-am
1472+
1473+ps-am:
1474+
1475+uninstall-am: uninstall-upstart_jobs_initramfs_configDATA
1476+
1477+.MAKE: install-am install-strip
1478+
1479+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
1480+ distclean distclean-generic distclean-libtool distdir dvi \
1481+ dvi-am html html-am info info-am install install-am \
1482+ install-data install-data-am install-dvi install-dvi-am \
1483+ install-exec install-exec-am install-html install-html-am \
1484+ install-info install-info-am install-man install-pdf \
1485+ install-pdf-am install-ps install-ps-am install-strip \
1486+ install-upstart_jobs_initramfs_configDATA installcheck \
1487+ installcheck-am installdirs maintainer-clean \
1488+ maintainer-clean-generic mostlyclean mostlyclean-generic \
1489+ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
1490+ uninstall-upstart_jobs_initramfs_configDATA
1491+
1492+
1493+# Tell versions [3.59,3.63) of GNU make to not export all variables.
1494+# Otherwise a system limit (for SysV at least) may be exceeded.
1495+.NOEXPORT:
1496
1497=== added file 'debian/initramfs/upstart-jobs/mountall.conf'
1498--- debian/initramfs/upstart-jobs/mountall.conf 1970-01-01 00:00:00 +0000
1499+++ debian/initramfs/upstart-jobs/mountall.conf 2011-07-15 11:51:33 +0000
1500@@ -0,0 +1,27 @@
1501+# mountall - Mount filesystems on boot
1502+#
1503+# This helper mounts filesystems in the correct order as the devices
1504+# and mountpoints become available.
1505+
1506+description "Mount filesystems on boot"
1507+
1508+start on stopping boot-premount
1509+stop on filesystem
1510+
1511+expect daemon
1512+task
1513+
1514+emits virtual-filesystems
1515+emits local-filesystems
1516+emits remote-filesystems
1517+emits all-swaps
1518+emits filesystem
1519+emits mounting
1520+emits mounted
1521+emits device-not-ready
1522+
1523+# temporary, until we have progress indication
1524+# and output capture (next week :p)
1525+console output
1526+
1527+exec mountall --daemon
1528
1529=== modified file 'src/Makefile.am'
1530--- src/Makefile.am 2010-03-12 18:22:45 +0000
1531+++ src/Makefile.am 2011-07-15 11:51:33 +0000
1532@@ -21,9 +21,13 @@
1533 mountall
1534
1535 mountall_SOURCES = \
1536- mountall.c
1537+ control.c control.h mountall.c
1538+
1539 nodist_mountall_SOURCES = \
1540- $(com_ubuntu_Upstart_OUTPUTS)
1541+ $(com_ubuntu_Upstart_OUTPUTS) \
1542+ $(com_ubuntu_Mountall_Server_OUTPUTS)
1543+
1544+
1545 mountall_LDADD = \
1546 $(NIH_LIBS) \
1547 $(NIH_DBUS_LIBS) \
1548@@ -32,7 +36,6 @@
1549 $(PLYMOUTH_LIBS) \
1550 $(LTLIBINTL)
1551
1552-
1553 com_ubuntu_Upstart_OUTPUTS = \
1554 com.ubuntu.Upstart.c \
1555 com.ubuntu.Upstart.h
1556@@ -42,19 +45,35 @@
1557
1558 $(com_ubuntu_Upstart_OUTPUTS): $(com_ubuntu_Upstart_XML)
1559 $(NIH_DBUS_TOOL) \
1560- --package=$(PACAKGE) \
1561+ --package=$(PACKAGE) \
1562 --mode=proxy --prefix=upstart \
1563 --default-interface=com.ubuntu.Upstart0_6 \
1564 --output=$@ $<
1565
1566+com_ubuntu_Mountall_Server_OUTPUTS = \
1567+ com.ubuntu.Mountall.Server.c \
1568+ com.ubuntu.Mountall.Server.h
1569+
1570+com_ubuntu_Mountall_Server_XML = \
1571+ ../dbus/com.ubuntu.Mountall.Server.xml
1572+
1573+$(com_ubuntu_Mountall_Server_OUTPUTS): $(com_ubuntu_Mountall_Server_XML)
1574+ $(NIH_DBUS_TOOL) \
1575+ --package=$(PACKAGE) \
1576+ --mode=object --prefix=control \
1577+ --default-interface=com.ubuntu.Mountall0_1.Server \
1578+ --output=$@ $<
1579+
1580
1581 # These have to be built sources because we can't compile object files
1582 # without the header file existing first
1583 BUILT_SOURCES = \
1584- $(com_ubuntu_Upstart_OUTPUTS)
1585+ $(com_ubuntu_Upstart_OUTPUTS) \
1586+ $(com_ubuntu_Mountall_Server_OUTPUTS)
1587
1588 CLEANFILES = \
1589- $(com_ubuntu_Upstart_OUTPUTS)
1590+ $(com_ubuntu_Upstart_OUTPUTS) \
1591+ $(com_ubuntu_Mountall_Server_OUTPUTS)
1592
1593
1594 clean-local:
1595
1596=== modified file 'src/Makefile.in'
1597--- src/Makefile.in 2011-03-01 21:34:04 +0000
1598+++ src/Makefile.in 2011-07-15 11:51:33 +0000
1599@@ -68,9 +68,10 @@
1600 CONFIG_CLEAN_VPATH_FILES =
1601 am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(initdir)"
1602 PROGRAMS = $(sbin_PROGRAMS)
1603-am_mountall_OBJECTS = mountall.$(OBJEXT)
1604+am_mountall_OBJECTS = control.$(OBJEXT) mountall.$(OBJEXT)
1605 am__objects_1 = com.ubuntu.Upstart.$(OBJEXT)
1606-nodist_mountall_OBJECTS = $(am__objects_1)
1607+am__objects_2 = com.ubuntu.Mountall.Server.$(OBJEXT)
1608+nodist_mountall_OBJECTS = $(am__objects_1) $(am__objects_2)
1609 mountall_OBJECTS = $(am_mountall_OBJECTS) $(nodist_mountall_OBJECTS)
1610 am__DEPENDENCIES_1 =
1611 mountall_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
1612@@ -321,10 +322,11 @@
1613 initdir = $(libdir)/init
1614 dist_init_DATA = fstab
1615 mountall_SOURCES = \
1616- mountall.c
1617+ control.c control.h mountall.c
1618
1619 nodist_mountall_SOURCES = \
1620- $(com_ubuntu_Upstart_OUTPUTS)
1621+ $(com_ubuntu_Upstart_OUTPUTS) \
1622+ $(com_ubuntu_Mountall_Server_OUTPUTS)
1623
1624 mountall_LDADD = \
1625 $(NIH_LIBS) \
1626@@ -341,14 +343,23 @@
1627 com_ubuntu_Upstart_XML = \
1628 ../dbus/com.ubuntu.Upstart.xml
1629
1630+com_ubuntu_Mountall_Server_OUTPUTS = \
1631+ com.ubuntu.Mountall.Server.c \
1632+ com.ubuntu.Mountall.Server.h
1633+
1634+com_ubuntu_Mountall_Server_XML = \
1635+ ../dbus/com.ubuntu.Mountall.Server.xml
1636+
1637
1638 # These have to be built sources because we can't compile object files
1639 # without the header file existing first
1640 BUILT_SOURCES = \
1641- $(com_ubuntu_Upstart_OUTPUTS)
1642+ $(com_ubuntu_Upstart_OUTPUTS) \
1643+ $(com_ubuntu_Mountall_Server_OUTPUTS)
1644
1645 CLEANFILES = \
1646- $(com_ubuntu_Upstart_OUTPUTS)
1647+ $(com_ubuntu_Upstart_OUTPUTS) \
1648+ $(com_ubuntu_Mountall_Server_OUTPUTS)
1649
1650 all: $(BUILT_SOURCES)
1651 $(MAKE) $(AM_MAKEFLAGS) all-am
1652@@ -438,7 +449,9 @@
1653 distclean-compile:
1654 -rm -f *.tab.c
1655
1656+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com.ubuntu.Mountall.Server.Po@am__quote@
1657 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com.ubuntu.Upstart.Po@am__quote@
1658+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/control.Po@am__quote@
1659 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mountall.Po@am__quote@
1660
1661 .c.o:
1662@@ -701,11 +714,18 @@
1663
1664 $(com_ubuntu_Upstart_OUTPUTS): $(com_ubuntu_Upstart_XML)
1665 $(NIH_DBUS_TOOL) \
1666- --package=$(PACAKGE) \
1667+ --package=$(PACKAGE) \
1668 --mode=proxy --prefix=upstart \
1669 --default-interface=com.ubuntu.Upstart0_6 \
1670 --output=$@ $<
1671
1672+$(com_ubuntu_Mountall_Server_OUTPUTS): $(com_ubuntu_Mountall_Server_XML)
1673+ $(NIH_DBUS_TOOL) \
1674+ --package=$(PACKAGE) \
1675+ --mode=object --prefix=control \
1676+ --default-interface=com.ubuntu.Mountall0_1.Server \
1677+ --output=$@ $<
1678+
1679 clean-local:
1680 rm -f *.gcno *.gcda
1681
1682
1683=== added file 'src/control.c'
1684--- src/control.c 1970-01-01 00:00:00 +0000
1685+++ src/control.c 2011-07-15 11:51:33 +0000
1686@@ -0,0 +1,258 @@
1687+/* mountall
1688+ *
1689+ * Copyright © 2010 Canonical Ltd.
1690+ * Author: Surbhi A. Palande <surbhi.palande@ubuntu.com>
1691+ *
1692+ * This file is based on control.c in upstart whose
1693+ * Author: Scott James Remnant <scott@netsplit.com>
1694+ *
1695+ * This program is free software; you can redistribute it and/or modify
1696+ * it under the terms of the GNU General Public License version 2, as
1697+ * published by the Free Software Foundation.
1698+ *
1699+ * This program is distributed in the hope that it will be useful,
1700+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1701+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1702+ * GNU General Public License for more details.
1703+ *
1704+ * You should have received a copy of the GNU General Public License along
1705+ * with this program; if not, write to the Free Software Foundation, Inc.,
1706+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
1707+ */
1708+
1709+#include <dbus/dbus.h>
1710+
1711+#include <nih/macros.h>
1712+#include <nih/alloc.h>
1713+#include <nih/string.h>
1714+#include <nih/list.h>
1715+#include <nih/io.h>
1716+#include <nih/main.h>
1717+#include <nih/logging.h>
1718+#include <nih/error.h>
1719+#include <nih/errors.h>
1720+
1721+#include <nih-dbus/dbus_error.h>
1722+#include <nih-dbus/dbus_connection.h>
1723+#include <nih-dbus/dbus_message.h>
1724+#include <nih-dbus/dbus_object.h>
1725+
1726+#include "dbus/mountall.h"
1727+#include "com.ubuntu.Mountall.Server.h"
1728+#include "mountall.h"
1729+
1730+extern const char *package_string;
1731+
1732+/* Prototypes for static functions */
1733+static int control_server_connect (DBusServer *server, DBusConnection *conn);
1734+static void control_disconnected (DBusConnection *conn);
1735+static void control_register_all (DBusConnection *conn);
1736+
1737+/**
1738+ * control_server
1739+ *
1740+ * D-Bus server listening for new direct connections.
1741+ **/
1742+DBusServer *control_server = NULL;
1743+
1744+
1745+/**
1746+ * control_server_address:
1747+ *
1748+ * Address on which the control server may be reached.
1749+ **/
1750+const char * control_server_address = DBUS_ADDRESS_MNTALL;
1751+
1752+/**
1753+ * control_server_open:
1754+ *
1755+ * Open a listening D-Bus server and store it in the control_server global.
1756+ * New connections are permitted from the root user, and handled
1757+ * automatically in the main loop.
1758+ *
1759+ * Returns: zero on success, negative value on raised error.
1760+ **/
1761+
1762+int
1763+control_server_open (void)
1764+{
1765+ nih_assert (control_server == NULL);
1766+
1767+ control_server = nih_dbus_server (control_server_address,
1768+ control_server_connect,
1769+ control_disconnected);
1770+ if (! control_server)
1771+ return -1;
1772+
1773+ nih_debug("Mountall0_1.Server started at address: %s", control_server_address);
1774+
1775+ return 0;
1776+}
1777+
1778+/**
1779+ * control_server_connect:
1780+ *
1781+ * Called when a new client connects to our server and is used to register
1782+ * objects on the new connection.
1783+ *
1784+ * Returns: always TRUE.
1785+ **/
1786+static int
1787+control_server_connect (DBusServer *server,
1788+ DBusConnection *conn)
1789+{
1790+ nih_assert (server != NULL);
1791+ nih_assert (server == control_server);
1792+ nih_assert (conn != NULL);
1793+
1794+ /* Register objects on the connection. */
1795+ control_register_all (conn);
1796+
1797+ nih_debug("Mountall0_1.Server::Connection from private client");
1798+
1799+ return TRUE;
1800+}
1801+
1802+/**
1803+ * control_register_all:
1804+ * @conn: connection to register objects for.
1805+ *
1806+ * Registers the manager object and objects for all jobs and instances on
1807+ * the given connection.
1808+ **/
1809+static void
1810+control_register_all (DBusConnection *conn)
1811+{
1812+ nih_assert (conn != NULL);
1813+
1814+ /* Register the manager object, this is the primary point of contact
1815+ * for clients. We only check for success, otherwise we're happy
1816+ * to let this object be tied to the lifetime of the connection.
1817+ */
1818+ NIH_MUST (nih_dbus_object_new (NULL, conn, DBUS_PATH_MNTALL,
1819+ control_interfaces, NULL));
1820+}
1821+
1822+/**
1823+ * control_disconnected:
1824+ *
1825+ * This function is called when the connection to the D-Bus system bus,
1826+ * or a client connection to our D-Bus server, is dropped and our reference
1827+ * is about to be list. We clear the connection from our current list
1828+ * and drop the control_bus global if relevant.
1829+ **/
1830+static void
1831+control_disconnected (DBusConnection *conn)
1832+{
1833+ nih_assert (conn != NULL);
1834+}
1835+
1836+/**
1837+ * control_stop_timer:
1838+ * @mountpoint: the mountpoint corresponding to the device for which the
1839+ * timeout option has to be disabled.
1840+ *
1841+ * Implements the StopTimer method of com.ubuntu.Moutall01_Server
1842+ * interface.
1843+ *
1844+ * This function is called for stopping a previously started timer for a
1845+ * mountpoint. Stopping a timer has the effect that mountall would no longer
1846+ * expect the corresponding device to be ready within a previously registered
1847+ * stiplulated time period. After this call, mountall will wait endlessly till
1848+ * the device becomes ready. Use this function only when you know that you
1849+ * might restart the timer later or that you really want to wait endlessly
1850+ * till the device becomes available.
1851+ *
1852+ * Returns 0 on success and -1 on failure.
1853+ **/
1854+int
1855+control_stop_timer (void *data,
1856+ NihDBusMessage *message,
1857+ const char *mountpoint)
1858+{
1859+
1860+ nih_assert (mountpoint != NULL);
1861+ nih_assert (message != NULL);
1862+
1863+ return stop_dev_timer (mountpoint);
1864+}
1865+
1866+/**
1867+ * control_restart_timer:
1868+ * @mountpoint: the mountpoint corresponding to the device for which the
1869+ * timeout option has to be disabled.
1870+ *
1871+ * Implements the RestartTimer method of com.ubuntu.Moutall01_Server
1872+ * interface.
1873+ *
1874+ * This function is called for restarting a previously stopped timer for a
1875+ * mountpoint. After successfully restarting a timer, mountall will expect the
1876+ * corresponding device to become ready for mounting within the previously
1877+ * configured timeout or the default of 30 seconds.
1878+ *
1879+ * Returns 0 on success and -1 on failure.
1880+ **/
1881+int
1882+control_restart_timer (void *data,
1883+ NihDBusMessage *message,
1884+ const char *mountpoint)
1885+{
1886+
1887+ nih_assert (mountpoint != NULL);
1888+ nih_assert (message != NULL);
1889+
1890+ return restart_dev_timer (mountpoint);
1891+}
1892+
1893+/**
1894+ * control_change_mount_device:
1895+ * @devname: Name of the new device which you want to mount at @path.
1896+ * @path: Complete path which matches with the one found in /etc/fstab or what
1897+ * mountall already considers.
1898+ *
1899+ * Implements the ChangeMountDevice method of com.ubuntu.Moutall01_Server
1900+ * interface.
1901+ *
1902+ * Call this function to change the device to mount to an existing previous
1903+ * mountpoint.
1904+ **/
1905+int
1906+control_change_mount_device (void *data,
1907+ NihDBusMessage *message,
1908+ const char *devname,
1909+ const char *path)
1910+{
1911+ nih_assert (devname != NULL);
1912+ nih_assert (path != NULL);
1913+
1914+ return change_mount_device (devname, path);
1915+}
1916+
1917+/**
1918+ * control_get_version:
1919+ * @data: not used,
1920+ * @message: D-Bus connection and message received,
1921+ * @version: pointer for reply string.
1922+ *
1923+ * Implements the get method for the version property of the
1924+ * com.ubuntu.Mountall0_1.Server interface.
1925+ *
1926+ * Called to obtain the version of the init daemon, which will be stored
1927+ * as a string in @version.
1928+ *
1929+ * Returns: zero on success, negative value on raised error.
1930+ **/
1931+int
1932+control_get_version (void *data,
1933+ NihDBusMessage *message,
1934+ char **version)
1935+{
1936+ nih_assert (message != NULL);
1937+ nih_assert (version != NULL);
1938+
1939+ *version = nih_strdup (message, package_string);
1940+ if (!*version)
1941+ nih_return_no_memory_error (-1);
1942+
1943+ return 0;
1944+}
1945
1946=== added file 'src/control.h'
1947--- src/control.h 1970-01-01 00:00:00 +0000
1948+++ src/control.h 2011-07-15 11:51:33 +0000
1949@@ -0,0 +1,36 @@
1950+/* mountall
1951+ *
1952+ * Copyright © 2010 Canonical Ltd.
1953+ *
1954+ * This program is free software; you can redistribute it and/or modify
1955+ * it under the terms of the GNU General Public License version 2, as
1956+ * published by the Free Software Foundation.
1957+ *
1958+ * This program is distributed in the hope that it will be useful,
1959+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1960+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1961+ * GNU General Public License for more details.
1962+ *
1963+ * You should have received a copy of the GNU General Public License along
1964+ * with this program; if not, write to the Free Software Foundation, Inc.,
1965+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
1966+ */
1967+
1968+#include "dbus/mountall.h"
1969+
1970+extern DBusServer *control_server;
1971+extern const NihDBusInterface *control_interfaces[];
1972+
1973+int control_server_open (void);
1974+int control_stop_timer (void *data, NihDBusMessage *message,
1975+ const char *mountpoint)
1976+ __attribute__ ((warn_unused_result));
1977+int control_restart_timer (void *data, NihDBusMessage *message,
1978+ const char *mountpoint)
1979+ __attribute__ ((warn_unused_result));
1980+int control_change_mount_device (void *data, NihDBusMessage *message,
1981+ const char *devname, const char *path)
1982+ __attribute__ ((warn_unused_result));
1983+int control_get_version (void *data, NihDBusMessage *message,
1984+ char **value)
1985+ __attribute__ ((warn_unused_result));
1986
1987=== modified file 'src/mountall.c'
1988--- src/mountall.c 2011-04-13 12:59:22 +0000
1989+++ src/mountall.c 2011-07-15 11:51:33 +0000
1990@@ -71,6 +71,7 @@
1991
1992 #include "dbus/upstart.h"
1993 #include "com.ubuntu.Upstart.h"
1994+#include "control.h"
1995
1996
1997 #define BUILTIN_FSTAB "/lib/init/fstab"
1998@@ -1342,7 +1343,7 @@
1999
2000 /* TAG_TIMEOUT is TAG_LOCAL with a timeout. timeout cannot be
2001 * inherited but local could be */
2002- if(tag == TAG_TIMEOUT)
2003+ if (tag == TAG_TIMEOUT)
2004 tag = TAG_LOCAL;
2005
2006 if ((tag == TAG_LOCAL)
2007@@ -1448,7 +1449,7 @@
2008 num_local_mounted++;
2009 num_timeout_mounted++;
2010 if (num_timeout_mounted == num_timeout) {
2011- nih_message(_("\n %s finished! "), "local_timeout");
2012+ nih_message (_("\n %s finished! "), "local_timeout");
2013 /* Stop the timeout waiting for device to get ready"
2014 */
2015 if (device_ready_timer) {
2016@@ -1596,9 +1597,22 @@
2017 num_swap_mounted, num_swap);
2018 }
2019
2020-
2021+/*
2022+ * is_device_ready:
2023+ *
2024+ * @data: Not used
2025+ * @timer: timer which was preconfigured and on the expiry of which this
2026+ * function is called.
2027+ *
2028+ * This function is called to check if any device marked with the "timeout"
2029+ * option in the /etc/fstab is not ready when the preconfigured @timer
2030+ * expires.
2031+ * It emits a "device-not-ready" event when it finds that such a device is not
2032+ * yet ready.
2033+ */
2034 void
2035-is_device_ready(void * data, NihTimer *timer)
2036+is_device_ready (void * data,
2037+ NihTimer *timer)
2038 {
2039 device_ready_timer = NULL;
2040 NIH_LIST_FOREACH (mounts, iter) {
2041@@ -1617,17 +1631,20 @@
2042 || (! strncmp (mnt->device, "UUID=", 5))
2043 || (! strncmp (mnt->device, "LABEL=", 6))))
2044 {
2045- nih_message("%s device not ready in ROOTDELAY sec", MOUNT_NAME (mnt));
2046- emit_event("device-not-ready", mnt);
2047- break;
2048-
2049+ nih_message ("%s device not ready in ROOTDELAY sec", MOUNT_NAME (mnt));
2050+ emit_event ("device-not-ready", mnt);
2051 }
2052-
2053 }
2054-
2055 }
2056
2057-void activate_timer()
2058+/*
2059+ * activate_timer:
2060+ *
2061+ * This function is called to start a timer when the first device with
2062+ * "timeout" option is found.
2063+ */
2064+void
2065+activate_timer (void)
2066 {
2067 NIH_LIST_FOREACH (mounts, iter) {
2068 Mount *mnt = (Mount *)iter;
2069@@ -1647,9 +1664,9 @@
2070 || (! strncmp (mnt->device, "UUID=", 5))
2071 || (! strncmp (mnt->device, "LABEL=", 6))))
2072 {
2073- if(!dev_wait_time)
2074+ if (!dev_wait_time)
2075 dev_wait_time = ROOTDELAY;
2076- nih_message(_("Shall wait for device: %s for %d seconds, starting timer"), MOUNT_NAME (mnt), dev_wait_time);
2077+ nih_debug ("Shall wait for device: %s for %d seconds, starting timer", MOUNT_NAME (mnt), dev_wait_time);
2078 device_ready_timer = NIH_MUST (nih_timer_add_timeout (NULL,
2079 dev_wait_time, is_device_ready, NULL));
2080 break;
2081@@ -1682,8 +1699,13 @@
2082 }
2083 }
2084
2085- if (all)
2086+ if (all) {
2087+ if (control_server) {
2088+ dbus_server_disconnect (control_server);
2089+ dbus_server_unref (control_server);
2090+ }
2091 nih_main_loop_exit (EXIT_OK);
2092+ }
2093 }
2094 }
2095
2096@@ -1971,7 +1993,7 @@
2097 */
2098 if ((errno != EEXIST)
2099 && has_option (mnt, "optional", FALSE)) {
2100- nih_debug ("%s: mountpoint doesn't exist, ignoring",
2101+ nih_debug ("%s: mountpoint doesn't exist; ignoring",
2102 MOUNT_NAME (mnt));
2103 mounted (mnt);
2104 return;
2105@@ -3158,37 +3180,37 @@
2106 /* Display that message */
2107 switch (plymouth_error) {
2108 case ERROR_BORED:
2109- message = NIH_MUST (nih_sprintf (NULL,_("The disk drive for %s is not ready yet or not present"),
2110+ message = NIH_MUST (nih_sprintf (NULL,_("The disk drive for %s is not ready yet or not present."),
2111 MOUNT_NAME (plymouth_mnt)));
2112 keys_message = NIH_MUST (nih_sprintf (NULL, "keys:%s",
2113- _("Continue to wait; or Press S to skip mounting or M for manual recovery")));
2114+ _("Continue to wait, or Press S to skip mounting or M for manual recovery")));
2115 plymouth_keys = "SsMm";
2116 break;
2117 case ERROR_FSCK_FAILED:
2118- message = NIH_MUST (nih_sprintf (NULL,_("Errors were found while checking the disk drive for %s"),
2119+ message = NIH_MUST (nih_sprintf (NULL,_("Errors were found while checking the disk drive for %s."),
2120 MOUNT_NAME (plymouth_mnt)));
2121 keys_message = NIH_MUST (nih_sprintf (NULL, "keys:%s",
2122- _("Press F to attempt to fix the errors, I to ignore, S to skip mounting or M for manual recovery")));
2123+ _("Press F to attempt to fix the errors, I to ignore, S to skip mounting, or M for manual recovery")));
2124 plymouth_keys = "FfIiSsMm";
2125 break;
2126 case ERROR_FSCK_FAILED_HARD:
2127- message = NIH_MUST (nih_sprintf (NULL,_("Serious errors were found while checking the disk drive for %s"),
2128+ message = NIH_MUST (nih_sprintf (NULL,_("Serious errors were found while checking the disk drive for %s."),
2129 MOUNT_NAME (plymouth_mnt)));
2130 keys_message = NIH_MUST (nih_sprintf (NULL, "keys:%s",
2131- _("Press I to ignore, S to skip mounting or M for manual recovery")));
2132+ _("Press I to ignore, S to skip mounting, or M for manual recovery")));
2133 plymouth_keys = "IiSsMm";
2134 break;
2135 case ERROR_MOUNT_FAILED:
2136- message = NIH_MUST (nih_sprintf (NULL, _("An error occurred while mounting %s"),
2137+ message = NIH_MUST (nih_sprintf (NULL, _("An error occurred while mounting %s."),
2138 MOUNT_NAME (plymouth_mnt)));
2139 keys_message = NIH_MUST (nih_sprintf (NULL, "keys:%s",
2140 _("Press S to skip mounting or M for manual recovery")));
2141 plymouth_keys = "SsMm";
2142 break;
2143 case ERROR_FSCK_IN_PROGRESS:
2144- message = NIH_MUST (nih_strdup (NULL, _("Your disk drives are being checked for errors. This may take some time")));
2145+ message = NIH_MUST (nih_strdup (NULL, _("Checking disk drives are for errors. This may take several minutes.")));
2146 keys_message = NIH_MUST (nih_sprintf (NULL, "keys:%s",
2147- _("Press C to cancel all checks currently in progress")));
2148+ _("Press C to cancel all checks in progress")));
2149 plymouth_keys = "Cc";
2150 break;
2151 default:
2152@@ -3334,21 +3356,35 @@
2153 }
2154 }
2155
2156-int set_dev_wait_time(NihOption *option, const char *arg)
2157+/*
2158+ * set_dev_wait_time:
2159+ *
2160+ * @option: Not used
2161+ * @arg: String receieved at the mountall command line by nih_option_parser
2162+ * and passed to this function for parsing.
2163+ *
2164+ * This function is used to set the "dev_wait_time option" argument specified
2165+ * at the mountall command line. It is called by the nih_option_parser for
2166+ * parsing the argument string specified by @arg
2167+ *
2168+ */
2169+int
2170+set_dev_wait_time (NihOption *option,
2171+ const char *arg)
2172 {
2173 char * end_ptr;
2174- dev_wait_time = strtol(arg, &end_ptr, 10);
2175+ dev_wait_time = strtol (arg, &end_ptr, 10);
2176 int err = 0;
2177- if(dev_wait_time <= 0) {
2178- nih_error(_("\n Legal values of dev-wait-time lie between 1sec to 2147483647 sec"));
2179+ if (dev_wait_time <= 0) {
2180+ nih_error (_("\n Legal values of dev-wait-time lie between 1sec to 2147483647 sec"));
2181 err = -1;
2182 }
2183 else if ((dev_wait_time == LONG_MIN) || (dev_wait_time == LONG_MAX)) {
2184- nih_error(_("\n Legal values of dev-wait-time lie between 1sec to 2147483647 sec"));
2185+ nih_error (_("\n Legal values of dev-wait-time lie between 1sec to 2147483647 sec"));
2186 err = -1;
2187 }
2188 else if (*end_ptr != '\0') {
2189- nih_error(_("\n Legal values of dev-wait-time lie between 1sec to 2147483647 sec"));
2190+ nih_error (_("\n Legal values of dev-wait-time lie between 1sec to 2147483647 sec"));
2191 err = -1;
2192 }
2193 return err;
2194@@ -3356,6 +3392,195 @@
2195
2196
2197 /**
2198+ * stop_mountpoint_timer:
2199+ * @mountpoint: mountpoint whose timer you want to stop.
2200+ *
2201+ * This function is called to stop a previously started timer of a device
2202+ * Note that for this function to be successful, @mountpoint should be a
2203+ * mountpoint corresponding to a device whose "timeout" option is set in the
2204+ * /etc/fstab.
2205+ *
2206+ * Returns 0 on stopping the timer and -1 on not doing so.
2207+ *
2208+ **/
2209+int
2210+stop_dev_timer (const char *mountpoint)
2211+{
2212+ int ret = -1;
2213+
2214+ nih_assert (mountpoint != NULL);
2215+
2216+ if (strlen (mountpoint) == 0) {
2217+ nih_message (_("Empty mountpoint specified"));
2218+ return ret;
2219+ }
2220+
2221+ NIH_LIST_FOREACH (mounts, iter) {
2222+ Mount *mnt = (Mount *)iter;
2223+
2224+ if (mnt->mounted)
2225+ continue;
2226+ if (mnt->tag != TAG_TIMEOUT)
2227+ continue;
2228+
2229+ if ((! mnt->ready)
2230+ && (! mnt->nodev)
2231+ && (! is_remote (mnt))
2232+ && ((! strncmp (mnt->device, "/dev/", 5))
2233+ || (! strncmp (mnt->device, "UUID=", 5))
2234+ || (! strncmp (mnt->device, "LABEL=", 6)))
2235+ && (! strcmp (mnt->mountpoint, mountpoint)))
2236+ {
2237+ if (device_ready_timer) {
2238+ nih_debug ("Stopping the timer for the device:"
2239+ "%s for %d seconds, starting timer",
2240+ MOUNT_NAME (mnt), dev_wait_time);
2241+ nih_free (device_ready_timer);
2242+ device_ready_timer = NULL;
2243+ ret = 0;
2244+ }
2245+ break;
2246+
2247+ }
2248+ }
2249+ return ret;
2250+}
2251+
2252+/**
2253+ * restart_dev_timer:
2254+ ** @mountpoint: mountpoint whose timer you want to stop.
2255+ *
2256+ * This function is called to restart a previously stopped timer of a device
2257+ * Note that for this function to be successful, @mountpoint should be a
2258+ * mountpoint corresponding to a device whose "timeout" option is set in the
2259+ * /etc/fstab.
2260+ *
2261+ * Returns 0 on restarting the timer and -1 on not doing so.
2262+ *
2263+ **/
2264+int
2265+restart_dev_timer (const char *mountpoint)
2266+{
2267+ int ret = -1;
2268+
2269+ nih_assert (mountpoint != NULL);
2270+
2271+ if (strlen (mountpoint) == 0) {
2272+ nih_message (_("Empty mountpoint specified"));
2273+ return ret;
2274+ }
2275+
2276+ NIH_LIST_FOREACH (mounts, iter) {
2277+ Mount *mnt = (Mount *)iter;
2278+
2279+ if (mnt->mounted)
2280+ continue;
2281+ if (mnt->tag != TAG_TIMEOUT)
2282+ continue;
2283+
2284+ if ((! mnt->ready)
2285+ && (! mnt->nodev)
2286+ && (! is_remote (mnt))
2287+ && ((! strncmp (mnt->device, "/dev/", 5))
2288+ || (! strncmp (mnt->device, "UUID=", 5))
2289+ || (! strncmp (mnt->device, "LABEL=", 6)))
2290+ && (! strcmp (mnt->mountpoint, mountpoint)))
2291+ {
2292+
2293+ if (!dev_wait_time)
2294+ dev_wait_time = ROOTDELAY;
2295+ if (!device_ready_timer) {
2296+ nih_debug ("Shall wait for device: %s for %d "
2297+ "seconds, starting timer",
2298+ MOUNT_NAME (mnt), dev_wait_time);
2299+ device_ready_timer = NIH_MUST (nih_timer_add_timeout (NULL,
2300+ dev_wait_time, is_device_ready, NULL));
2301+ ret = 0;
2302+ }
2303+ break;
2304+
2305+ }
2306+ }
2307+ return ret;
2308+}
2309+
2310+/**
2311+ * change_mount_device:
2312+ * @devname: name of the new device.
2313+ * @path: full path to a previously existing mountpoint.
2314+ *
2315+ * This function is called to change the device that would be mounted at a
2316+ * given mountpoint without calling this function. Note that @path should be
2317+ * what mountall has read from fstab or what mountall already knows for
2318+ * mounting a device.
2319+ *
2320+ * Return 0 on successfully changing the device and -1 on not doing so.
2321+ **/
2322+int
2323+change_mount_device (const char *devname,
2324+ const char *path)
2325+{
2326+ int ret = -1;
2327+
2328+ nih_assert (devname != NULL);
2329+ nih_assert (path != NULL);
2330+
2331+ if (strlen (devname) == 0) {
2332+ nih_error(_("Empty device name specified"));
2333+ return ret;
2334+ }
2335+ if (strlen (path) == 0) {
2336+ nih_error (_("Empty mount point specified"));
2337+ return ret;
2338+ }
2339+
2340+ NIH_LIST_FOREACH (mounts, iter) {
2341+ Mount *mnt = (Mount *)iter;
2342+
2343+ if (mnt->mounted)
2344+ continue;
2345+ if (mnt->tag != TAG_TIMEOUT)
2346+ continue;
2347+
2348+ if ((! mnt->ready)
2349+ && (!mnt->nodev)
2350+ && (!is_remote (mnt))
2351+ && ((!strncmp (mnt->device, "/dev/", 5))
2352+ || (!strncmp (mnt->device, "UUID=", 5))
2353+ || (!strncmp (mnt->device, "LABEL=", 6)))
2354+ )
2355+ {
2356+ /* Change the device to be mounted on a pre-registered
2357+ * mountpoint
2358+ */
2359+ if ((!strcmp (mnt->mountpoint, path))) {
2360+ /* Change only if the requested device is
2361+ * really any different than whats stored
2362+ */
2363+ if (!strcmp (mnt->device, devname)) {
2364+ char * newdev;
2365+ ret = 0;
2366+ newdev = nih_strdup (mounts, devname);
2367+ if (!newdev) {
2368+ nih_error_raise_no_memory ();
2369+ nih_error (("Could not change the mountpoint "
2370+ "for device: %s"), devname);
2371+ ret = -1;
2372+ }
2373+ else {
2374+ nih_free (mnt->device);
2375+ mnt->device = newdev;
2376+ emit_event ("changed-device", mnt);
2377+ }
2378+ }
2379+ break;
2380+ }
2381+ }
2382+ }
2383+ return ret;
2384+}
2385+
2386+/**
2387 * options:
2388 *
2389 * Command-line options accepted by this program.
2390@@ -3554,6 +3779,21 @@
2391
2392 /* See what's already mounted */
2393 mark_mounted ();
2394+ /* Create a listening server for private connections. */
2395+ while ((ret = control_server_open ()) < 0) {
2396+ NihError *err;
2397+
2398+ err = nih_error_get ();
2399+ if (err->number != ENOMEM) {
2400+ nih_warn ("%s: %s", _("Unable to listen for private"
2401+ "connections"), err->message);
2402+ nih_free (err);
2403+ break;
2404+ }
2405+ nih_free (err);
2406+ }
2407+ if (!ret)
2408+ emit_event("mountallServer", NULL);
2409 /* Activate the timer for a fs that is local, unmounted and waits for
2410 * a device to be ready, before it can be mounted onto it. Timer on
2411 * only for fs not marked with a "nobootwait=1" */
2412
2413=== added file 'src/mountall.h'
2414--- src/mountall.h 1970-01-01 00:00:00 +0000
2415+++ src/mountall.h 2011-07-15 11:51:33 +0000
2416@@ -0,0 +1,24 @@
2417+/* mountall
2418+ *
2419+ * Copyright © 2010 Canonical Ltd.
2420+ *
2421+ * This program is free software; you can redistribute it and/or modify
2422+ * it under the terms of the GNU General Public License version 2, as
2423+ * published by the Free Software Foundation.
2424+ *
2425+ * This program is distributed in the hope that it will be useful,
2426+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2427+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2428+ * GNU General Public License for more details.
2429+ *
2430+ * You should have received a copy of the GNU General Public License along
2431+ * with this program; if not, write to the Free Software Foundation, Inc.,
2432+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
2433+ */
2434+
2435+int stop_dev_timer (const char * mountpoint)
2436+ __attribute__ ((warn_unused_result));
2437+int restart_dev_timer (const char * mountpoint)
2438+ __attribute__ ((warn_unused_result));
2439+int change_mount_device (const char * devname, const char * path)
2440+ __attribute__ ((warn_unused_result));
2441
2442=== added directory 'util'
2443=== added file 'util/Makefile.am'
2444--- util/Makefile.am 1970-01-01 00:00:00 +0000
2445+++ util/Makefile.am 2011-07-15 11:51:33 +0000
2446@@ -0,0 +1,56 @@
2447+## Process this file with automake to produce Makefile.in
2448+
2449+AM_CFLAGS = \
2450+ $(NIH_CFLAGS) \
2451+ $(NIH_DBUS_CFLAGS) \
2452+ $(DBUS_CFLAGS)
2453+
2454+AM_CPPFLAGS = \
2455+ -DLOCALEDIR="\"$(localedir)\"" \
2456+ -DSBINDIR="\"$(sbindir)\"" \
2457+ -I$(top_builddir) -I$(top_srcdir) -iquote$(builddir) -iquote$(srcdir) \
2458+ -I$(top_srcdir)/intl
2459+
2460+sbin_PROGRAMS = \
2461+ mntctl
2462+
2463+mntctl_SOURCES = \
2464+ mntctl.c mntctl.h
2465+
2466+nodist_mntctl_SOURCES = \
2467+ $(com_ubuntu_Mountall_Server_OUTPUTS)
2468+mntctl_LDADD = \
2469+ $(LTLIBINTL) \
2470+ $(NIH_LIBS) \
2471+ $(NIH_DBUS_LIBS) \
2472+ $(DBUS_LIBS)
2473+
2474+com_ubuntu_Mountall_Server_OUTPUTS = \
2475+ com.ubuntu.Mountall.Server.c \
2476+ com.ubuntu.Mountall.Server.h
2477+
2478+com_ubuntu_Mountall_Server_XML = \
2479+ ../dbus/com.ubuntu.Mountall.Server.xml
2480+
2481+$(com_ubuntu_Mountall_Server_OUTPUTS): $(com_ubuntu_Mountall_Server_XML)
2482+ $(AM_V_GEN)$(NIH_DBUS_TOOL) \
2483+ --package=$(PACKAGE) \
2484+ --mode=proxy --prefix=mountall_server \
2485+ --default-interface=com.ubuntu.Mountall0_1.Server \
2486+ --output=$@ $<
2487+
2488+# These have to be built sources because we can't compile object files
2489+# without the header file existing first
2490+BUILT_SOURCES = \
2491+ $(com_ubuntu_Mountall_Server_OUTPUTS)
2492+
2493+CLEANFILES = \
2494+ $(com_ubuntu_Mountall_Server_OUTPUTS)
2495+
2496+.PHONY:
2497+
2498+clean-local:
2499+ rm -f *.gcno *.gcda
2500+
2501+maintainer-clean-local:
2502+ rm -f *.gcov
2503
2504=== added file 'util/Makefile.in'
2505--- util/Makefile.in 1970-01-01 00:00:00 +0000
2506+++ util/Makefile.in 2011-07-15 11:51:33 +0000
2507@@ -0,0 +1,669 @@
2508+# Makefile.in generated by automake 1.11.1 from Makefile.am.
2509+# @configure_input@
2510+
2511+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
2512+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
2513+# Inc.
2514+# This Makefile.in is free software; the Free Software Foundation
2515+# gives unlimited permission to copy and/or distribute it,
2516+# with or without modifications, as long as this notice is preserved.
2517+
2518+# This program is distributed in the hope that it will be useful,
2519+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
2520+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
2521+# PARTICULAR PURPOSE.
2522+
2523+@SET_MAKE@
2524+
2525+VPATH = @srcdir@
2526+pkgdatadir = $(datadir)/@PACKAGE@
2527+pkgincludedir = $(includedir)/@PACKAGE@
2528+pkglibdir = $(libdir)/@PACKAGE@
2529+pkglibexecdir = $(libexecdir)/@PACKAGE@
2530+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
2531+install_sh_DATA = $(install_sh) -c -m 644
2532+install_sh_PROGRAM = $(install_sh) -c
2533+install_sh_SCRIPT = $(install_sh) -c
2534+INSTALL_HEADER = $(INSTALL_DATA)
2535+transform = $(program_transform_name)
2536+NORMAL_INSTALL = :
2537+PRE_INSTALL = :
2538+POST_INSTALL = :
2539+NORMAL_UNINSTALL = :
2540+PRE_UNINSTALL = :
2541+POST_UNINSTALL = :
2542+build_triplet = @build@
2543+host_triplet = @host@
2544+sbin_PROGRAMS = mntctl$(EXEEXT)
2545+subdir = util
2546+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
2547+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
2548+am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
2549+ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc2.m4 \
2550+ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \
2551+ $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intl.m4 \
2552+ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax.m4 \
2553+ $(top_srcdir)/m4/inttypes-pri.m4 \
2554+ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \
2555+ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
2556+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libnih.m4 \
2557+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/lock.m4 \
2558+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \
2559+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
2560+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
2561+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \
2562+ $(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \
2563+ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \
2564+ $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \
2565+ $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/m4/wchar_t.m4 \
2566+ $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \
2567+ $(top_srcdir)/configure.ac
2568+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
2569+ $(ACLOCAL_M4)
2570+mkinstalldirs = $(install_sh) -d
2571+CONFIG_HEADER = $(top_builddir)/config.h
2572+CONFIG_CLEAN_FILES =
2573+CONFIG_CLEAN_VPATH_FILES =
2574+am__installdirs = "$(DESTDIR)$(sbindir)"
2575+PROGRAMS = $(sbin_PROGRAMS)
2576+am_mntctl_OBJECTS = mntctl.$(OBJEXT)
2577+am__objects_1 = com.ubuntu.Mountall.Server.$(OBJEXT)
2578+nodist_mntctl_OBJECTS = $(am__objects_1)
2579+mntctl_OBJECTS = $(am_mntctl_OBJECTS) $(nodist_mntctl_OBJECTS)
2580+am__DEPENDENCIES_1 =
2581+mntctl_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
2582+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
2583+AM_V_lt = $(am__v_lt_$(V))
2584+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
2585+am__v_lt_0 = --silent
2586+DEFAULT_INCLUDES =
2587+depcomp = $(SHELL) $(top_srcdir)/depcomp
2588+am__depfiles_maybe = depfiles
2589+am__mv = mv -f
2590+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
2591+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
2592+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
2593+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
2594+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
2595+ $(AM_CFLAGS) $(CFLAGS)
2596+AM_V_CC = $(am__v_CC_$(V))
2597+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
2598+am__v_CC_0 = @echo " CC " $@;
2599+AM_V_at = $(am__v_at_$(V))
2600+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
2601+am__v_at_0 = @
2602+CCLD = $(CC)
2603+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
2604+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
2605+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
2606+AM_V_CCLD = $(am__v_CCLD_$(V))
2607+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
2608+am__v_CCLD_0 = @echo " CCLD " $@;
2609+AM_V_GEN = $(am__v_GEN_$(V))
2610+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
2611+am__v_GEN_0 = @echo " GEN " $@;
2612+SOURCES = $(mntctl_SOURCES) $(nodist_mntctl_SOURCES)
2613+DIST_SOURCES = $(mntctl_SOURCES)
2614+ETAGS = etags
2615+CTAGS = ctags
2616+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
2617+ACLOCAL = @ACLOCAL@
2618+ALLOCA = @ALLOCA@
2619+AMTAR = @AMTAR@
2620+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
2621+AR = @AR@
2622+AUTOCONF = @AUTOCONF@
2623+AUTOHEADER = @AUTOHEADER@
2624+AUTOMAKE = @AUTOMAKE@
2625+AWK = @AWK@
2626+BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
2627+CATOBJEXT = @CATOBJEXT@
2628+CC = @CC@
2629+CCDEPMODE = @CCDEPMODE@
2630+CFLAGS = @CFLAGS@
2631+CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
2632+CPP = @CPP@
2633+CPPFLAGS = @CPPFLAGS@
2634+CYGPATH_W = @CYGPATH_W@
2635+DATADIRNAME = @DATADIRNAME@
2636+DBUS_CFLAGS = @DBUS_CFLAGS@
2637+DBUS_LIBS = @DBUS_LIBS@
2638+DEFS = @DEFS@
2639+DEPDIR = @DEPDIR@
2640+DSYMUTIL = @DSYMUTIL@
2641+DUMPBIN = @DUMPBIN@
2642+ECHO_C = @ECHO_C@
2643+ECHO_N = @ECHO_N@
2644+ECHO_T = @ECHO_T@
2645+EGREP = @EGREP@
2646+EXEEXT = @EXEEXT@
2647+FGREP = @FGREP@
2648+GENCAT = @GENCAT@
2649+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
2650+GLIBC2 = @GLIBC2@
2651+GLIBC21 = @GLIBC21@
2652+GMSGFMT = @GMSGFMT@
2653+GMSGFMT_015 = @GMSGFMT_015@
2654+GREP = @GREP@
2655+HAVE_ASPRINTF = @HAVE_ASPRINTF@
2656+HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
2657+HAVE_SNPRINTF = @HAVE_SNPRINTF@
2658+HAVE_VISIBILITY = @HAVE_VISIBILITY@
2659+HAVE_WPRINTF = @HAVE_WPRINTF@
2660+INSTALL = @INSTALL@
2661+INSTALL_DATA = @INSTALL_DATA@
2662+INSTALL_PROGRAM = @INSTALL_PROGRAM@
2663+INSTALL_SCRIPT = @INSTALL_SCRIPT@
2664+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
2665+INSTOBJEXT = @INSTOBJEXT@
2666+INTLBISON = @INTLBISON@
2667+INTLLIBS = @INTLLIBS@
2668+INTLOBJS = @INTLOBJS@
2669+INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
2670+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
2671+LD = @LD@
2672+LDFLAGS = @LDFLAGS@
2673+LIBICONV = @LIBICONV@
2674+LIBINTL = @LIBINTL@
2675+LIBMULTITHREAD = @LIBMULTITHREAD@
2676+LIBOBJS = @LIBOBJS@
2677+LIBPTH = @LIBPTH@
2678+LIBPTH_PREFIX = @LIBPTH_PREFIX@
2679+LIBS = @LIBS@
2680+LIBTHREAD = @LIBTHREAD@
2681+LIBTOOL = @LIBTOOL@
2682+LIPO = @LIPO@
2683+LN_S = @LN_S@
2684+LTLIBC = @LTLIBC@
2685+LTLIBICONV = @LTLIBICONV@
2686+LTLIBINTL = @LTLIBINTL@
2687+LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
2688+LTLIBOBJS = @LTLIBOBJS@
2689+LTLIBPTH = @LTLIBPTH@
2690+LTLIBTHREAD = @LTLIBTHREAD@
2691+MAINT = @MAINT@
2692+MAKEINFO = @MAKEINFO@
2693+MKDIR_P = @MKDIR_P@
2694+MSGFMT = @MSGFMT@
2695+MSGFMT_015 = @MSGFMT_015@
2696+MSGMERGE = @MSGMERGE@
2697+NIH_CFLAGS = @NIH_CFLAGS@
2698+NIH_DBUS_CFLAGS = @NIH_DBUS_CFLAGS@
2699+NIH_DBUS_LIBS = @NIH_DBUS_LIBS@
2700+NIH_DBUS_TOOL = @NIH_DBUS_TOOL@
2701+NIH_LIBS = @NIH_LIBS@
2702+NM = @NM@
2703+NMEDIT = @NMEDIT@
2704+OBJDUMP = @OBJDUMP@
2705+OBJEXT = @OBJEXT@
2706+OTOOL = @OTOOL@
2707+OTOOL64 = @OTOOL64@
2708+PACKAGE = @PACKAGE@
2709+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
2710+PACKAGE_NAME = @PACKAGE_NAME@
2711+PACKAGE_STRING = @PACKAGE_STRING@
2712+PACKAGE_TARNAME = @PACKAGE_TARNAME@
2713+PACKAGE_URL = @PACKAGE_URL@
2714+PACKAGE_VERSION = @PACKAGE_VERSION@
2715+PATH_SEPARATOR = @PATH_SEPARATOR@
2716+PKG_CONFIG = @PKG_CONFIG@
2717+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
2718+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
2719+PLYMOUTH_CFLAGS = @PLYMOUTH_CFLAGS@
2720+PLYMOUTH_LIBS = @PLYMOUTH_LIBS@
2721+POSUB = @POSUB@
2722+PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
2723+RANLIB = @RANLIB@
2724+SED = @SED@
2725+SET_MAKE = @SET_MAKE@
2726+SHELL = @SHELL@
2727+STRIP = @STRIP@
2728+UDEV_CFLAGS = @UDEV_CFLAGS@
2729+UDEV_LIBS = @UDEV_LIBS@
2730+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
2731+USE_NLS = @USE_NLS@
2732+VERSION = @VERSION@
2733+WINDRES = @WINDRES@
2734+WOE32 = @WOE32@
2735+WOE32DLL = @WOE32DLL@
2736+XGETTEXT = @XGETTEXT@
2737+XGETTEXT_015 = @XGETTEXT_015@
2738+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
2739+abs_builddir = @abs_builddir@
2740+abs_srcdir = @abs_srcdir@
2741+abs_top_builddir = @abs_top_builddir@
2742+abs_top_srcdir = @abs_top_srcdir@
2743+ac_ct_CC = @ac_ct_CC@
2744+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
2745+am__include = @am__include@
2746+am__leading_dot = @am__leading_dot@
2747+am__quote = @am__quote@
2748+am__tar = @am__tar@
2749+am__untar = @am__untar@
2750+bindir = @bindir@
2751+build = @build@
2752+build_alias = @build_alias@
2753+build_cpu = @build_cpu@
2754+build_os = @build_os@
2755+build_vendor = @build_vendor@
2756+builddir = @builddir@
2757+datadir = @datadir@
2758+datarootdir = @datarootdir@
2759+docdir = @docdir@
2760+dvidir = @dvidir@
2761+exec_prefix = @exec_prefix@
2762+host = @host@
2763+host_alias = @host_alias@
2764+host_cpu = @host_cpu@
2765+host_os = @host_os@
2766+host_vendor = @host_vendor@
2767+htmldir = @htmldir@
2768+includedir = @includedir@
2769+infodir = @infodir@
2770+install_sh = @install_sh@
2771+libdir = @libdir@
2772+libexecdir = @libexecdir@
2773+localedir = @localedir@
2774+localstatedir = @localstatedir@
2775+lt_ECHO = @lt_ECHO@
2776+mandir = @mandir@
2777+mkdir_p = @mkdir_p@
2778+oldincludedir = @oldincludedir@
2779+pdfdir = @pdfdir@
2780+prefix = @prefix@
2781+program_transform_name = @program_transform_name@
2782+psdir = @psdir@
2783+sbindir = @sbindir@
2784+sharedstatedir = @sharedstatedir@
2785+srcdir = @srcdir@
2786+sysconfdir = @sysconfdir@
2787+target_alias = @target_alias@
2788+top_build_prefix = @top_build_prefix@
2789+top_builddir = @top_builddir@
2790+top_srcdir = @top_srcdir@
2791+AM_CFLAGS = \
2792+ $(NIH_CFLAGS) \
2793+ $(NIH_DBUS_CFLAGS) \
2794+ $(DBUS_CFLAGS)
2795+
2796+AM_CPPFLAGS = \
2797+ -DLOCALEDIR="\"$(localedir)\"" \
2798+ -DSBINDIR="\"$(sbindir)\"" \
2799+ -I$(top_builddir) -I$(top_srcdir) -iquote$(builddir) -iquote$(srcdir) \
2800+ -I$(top_srcdir)/intl
2801+
2802+mntctl_SOURCES = \
2803+ mntctl.c mntctl.h
2804+
2805+nodist_mntctl_SOURCES = \
2806+ $(com_ubuntu_Mountall_Server_OUTPUTS)
2807+
2808+mntctl_LDADD = \
2809+ $(LTLIBINTL) \
2810+ $(NIH_LIBS) \
2811+ $(NIH_DBUS_LIBS) \
2812+ $(DBUS_LIBS)
2813+
2814+com_ubuntu_Mountall_Server_OUTPUTS = \
2815+ com.ubuntu.Mountall.Server.c \
2816+ com.ubuntu.Mountall.Server.h
2817+
2818+com_ubuntu_Mountall_Server_XML = \
2819+ ../dbus/com.ubuntu.Mountall.Server.xml
2820+
2821+
2822+# These have to be built sources because we can't compile object files
2823+# without the header file existing first
2824+BUILT_SOURCES = \
2825+ $(com_ubuntu_Mountall_Server_OUTPUTS)
2826+
2827+CLEANFILES = \
2828+ $(com_ubuntu_Mountall_Server_OUTPUTS)
2829+
2830+all: $(BUILT_SOURCES)
2831+ $(MAKE) $(AM_MAKEFLAGS) all-am
2832+
2833+.SUFFIXES:
2834+.SUFFIXES: .c .lo .o .obj
2835+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
2836+ @for dep in $?; do \
2837+ case '$(am__configure_deps)' in \
2838+ *$$dep*) \
2839+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
2840+ && { if test -f $@; then exit 0; else break; fi; }; \
2841+ exit 1;; \
2842+ esac; \
2843+ done; \
2844+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign util/Makefile'; \
2845+ $(am__cd) $(top_srcdir) && \
2846+ $(AUTOMAKE) --foreign util/Makefile
2847+.PRECIOUS: Makefile
2848+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
2849+ @case '$?' in \
2850+ *config.status*) \
2851+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
2852+ *) \
2853+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
2854+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
2855+ esac;
2856+
2857+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
2858+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
2859+
2860+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
2861+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
2862+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
2863+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
2864+$(am__aclocal_m4_deps):
2865+install-sbinPROGRAMS: $(sbin_PROGRAMS)
2866+ @$(NORMAL_INSTALL)
2867+ test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
2868+ @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
2869+ for p in $$list; do echo "$$p $$p"; done | \
2870+ sed 's/$(EXEEXT)$$//' | \
2871+ while read p p1; do if test -f $$p || test -f $$p1; \
2872+ then echo "$$p"; echo "$$p"; else :; fi; \
2873+ done | \
2874+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
2875+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
2876+ sed 'N;N;N;s,\n, ,g' | \
2877+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
2878+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
2879+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
2880+ else { print "f", $$3 "/" $$4, $$1; } } \
2881+ END { for (d in files) print "f", d, files[d] }' | \
2882+ while read type dir files; do \
2883+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
2884+ test -z "$$files" || { \
2885+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
2886+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
2887+ } \
2888+ ; done
2889+
2890+uninstall-sbinPROGRAMS:
2891+ @$(NORMAL_UNINSTALL)
2892+ @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
2893+ files=`for p in $$list; do echo "$$p"; done | \
2894+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
2895+ -e 's/$$/$(EXEEXT)/' `; \
2896+ test -n "$$list" || exit 0; \
2897+ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
2898+ cd "$(DESTDIR)$(sbindir)" && rm -f $$files
2899+
2900+clean-sbinPROGRAMS:
2901+ @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \
2902+ echo " rm -f" $$list; \
2903+ rm -f $$list || exit $$?; \
2904+ test -n "$(EXEEXT)" || exit 0; \
2905+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
2906+ echo " rm -f" $$list; \
2907+ rm -f $$list
2908+mntctl$(EXEEXT): $(mntctl_OBJECTS) $(mntctl_DEPENDENCIES)
2909+ @rm -f mntctl$(EXEEXT)
2910+ $(AM_V_CCLD)$(LINK) $(mntctl_OBJECTS) $(mntctl_LDADD) $(LIBS)
2911+
2912+mostlyclean-compile:
2913+ -rm -f *.$(OBJEXT)
2914+
2915+distclean-compile:
2916+ -rm -f *.tab.c
2917+
2918+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com.ubuntu.Mountall.Server.Po@am__quote@
2919+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mntctl.Po@am__quote@
2920+
2921+.c.o:
2922+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
2923+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
2924+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
2925+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
2926+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
2927+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
2928+
2929+.c.obj:
2930+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
2931+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
2932+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
2933+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
2934+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
2935+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
2936+
2937+.c.lo:
2938+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
2939+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
2940+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
2941+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
2942+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
2943+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
2944+
2945+mostlyclean-libtool:
2946+ -rm -f *.lo
2947+
2948+clean-libtool:
2949+ -rm -rf .libs _libs
2950+
2951+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
2952+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
2953+ unique=`for i in $$list; do \
2954+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
2955+ done | \
2956+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
2957+ END { if (nonempty) { for (i in files) print i; }; }'`; \
2958+ mkid -fID $$unique
2959+tags: TAGS
2960+
2961+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
2962+ $(TAGS_FILES) $(LISP)
2963+ set x; \
2964+ here=`pwd`; \
2965+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
2966+ unique=`for i in $$list; do \
2967+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
2968+ done | \
2969+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
2970+ END { if (nonempty) { for (i in files) print i; }; }'`; \
2971+ shift; \
2972+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
2973+ test -n "$$unique" || unique=$$empty_fix; \
2974+ if test $$# -gt 0; then \
2975+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
2976+ "$$@" $$unique; \
2977+ else \
2978+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
2979+ $$unique; \
2980+ fi; \
2981+ fi
2982+ctags: CTAGS
2983+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
2984+ $(TAGS_FILES) $(LISP)
2985+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
2986+ unique=`for i in $$list; do \
2987+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
2988+ done | \
2989+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
2990+ END { if (nonempty) { for (i in files) print i; }; }'`; \
2991+ test -z "$(CTAGS_ARGS)$$unique" \
2992+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
2993+ $$unique
2994+
2995+GTAGS:
2996+ here=`$(am__cd) $(top_builddir) && pwd` \
2997+ && $(am__cd) $(top_srcdir) \
2998+ && gtags -i $(GTAGS_ARGS) "$$here"
2999+
3000+distclean-tags:
3001+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
3002+
3003+distdir: $(DISTFILES)
3004+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
3005+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
3006+ list='$(DISTFILES)'; \
3007+ dist_files=`for file in $$list; do echo $$file; done | \
3008+ sed -e "s|^$$srcdirstrip/||;t" \
3009+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
3010+ case $$dist_files in \
3011+ */*) $(MKDIR_P) `echo "$$dist_files" | \
3012+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
3013+ sort -u` ;; \
3014+ esac; \
3015+ for file in $$dist_files; do \
3016+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
3017+ if test -d $$d/$$file; then \
3018+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
3019+ if test -d "$(distdir)/$$file"; then \
3020+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
3021+ fi; \
3022+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
3023+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
3024+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
3025+ fi; \
3026+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
3027+ else \
3028+ test -f "$(distdir)/$$file" \
3029+ || cp -p $$d/$$file "$(distdir)/$$file" \
3030+ || exit 1; \
3031+ fi; \
3032+ done
3033+check-am: all-am
3034+check: $(BUILT_SOURCES)
3035+ $(MAKE) $(AM_MAKEFLAGS) check-am
3036+all-am: Makefile $(PROGRAMS)
3037+installdirs:
3038+ for dir in "$(DESTDIR)$(sbindir)"; do \
3039+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
3040+ done
3041+install: $(BUILT_SOURCES)
3042+ $(MAKE) $(AM_MAKEFLAGS) install-am
3043+install-exec: install-exec-am
3044+install-data: install-data-am
3045+uninstall: uninstall-am
3046+
3047+install-am: all-am
3048+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
3049+
3050+installcheck: installcheck-am
3051+install-strip:
3052+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
3053+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
3054+ `test -z '$(STRIP)' || \
3055+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
3056+mostlyclean-generic:
3057+
3058+clean-generic:
3059+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
3060+
3061+distclean-generic:
3062+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
3063+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
3064+
3065+maintainer-clean-generic:
3066+ @echo "This command is intended for maintainers to use"
3067+ @echo "it deletes files that may require special tools to rebuild."
3068+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
3069+clean: clean-am
3070+
3071+clean-am: clean-generic clean-libtool clean-local clean-sbinPROGRAMS \
3072+ mostlyclean-am
3073+
3074+distclean: distclean-am
3075+ -rm -rf ./$(DEPDIR)
3076+ -rm -f Makefile
3077+distclean-am: clean-am distclean-compile distclean-generic \
3078+ distclean-tags
3079+
3080+dvi: dvi-am
3081+
3082+dvi-am:
3083+
3084+html: html-am
3085+
3086+html-am:
3087+
3088+info: info-am
3089+
3090+info-am:
3091+
3092+install-data-am:
3093+
3094+install-dvi: install-dvi-am
3095+
3096+install-dvi-am:
3097+
3098+install-exec-am: install-sbinPROGRAMS
3099+
3100+install-html: install-html-am
3101+
3102+install-html-am:
3103+
3104+install-info: install-info-am
3105+
3106+install-info-am:
3107+
3108+install-man:
3109+
3110+install-pdf: install-pdf-am
3111+
3112+install-pdf-am:
3113+
3114+install-ps: install-ps-am
3115+
3116+install-ps-am:
3117+
3118+installcheck-am:
3119+
3120+maintainer-clean: maintainer-clean-am
3121+ -rm -rf ./$(DEPDIR)
3122+ -rm -f Makefile
3123+maintainer-clean-am: distclean-am maintainer-clean-generic \
3124+ maintainer-clean-local
3125+
3126+mostlyclean: mostlyclean-am
3127+
3128+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
3129+ mostlyclean-libtool
3130+
3131+pdf: pdf-am
3132+
3133+pdf-am:
3134+
3135+ps: ps-am
3136+
3137+ps-am:
3138+
3139+uninstall-am: uninstall-sbinPROGRAMS
3140+
3141+.MAKE: all check install install-am install-strip
3142+
3143+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
3144+ clean-libtool clean-local clean-sbinPROGRAMS ctags distclean \
3145+ distclean-compile distclean-generic distclean-libtool \
3146+ distclean-tags distdir dvi dvi-am html html-am info info-am \
3147+ install install-am install-data install-data-am install-dvi \
3148+ install-dvi-am install-exec install-exec-am install-html \
3149+ install-html-am install-info install-info-am install-man \
3150+ install-pdf install-pdf-am install-ps install-ps-am \
3151+ install-sbinPROGRAMS install-strip installcheck \
3152+ installcheck-am installdirs maintainer-clean \
3153+ maintainer-clean-generic maintainer-clean-local mostlyclean \
3154+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
3155+ pdf pdf-am ps ps-am tags uninstall uninstall-am \
3156+ uninstall-sbinPROGRAMS
3157+
3158+
3159+$(com_ubuntu_Mountall_Server_OUTPUTS): $(com_ubuntu_Mountall_Server_XML)
3160+ $(AM_V_GEN)$(NIH_DBUS_TOOL) \
3161+ --package=$(PACKAGE) \
3162+ --mode=proxy --prefix=mountall_server \
3163+ --default-interface=com.ubuntu.Mountall0_1.Server \
3164+ --output=$@ $<
3165+
3166+.PHONY:
3167+
3168+clean-local:
3169+ rm -f *.gcno *.gcda
3170+
3171+maintainer-clean-local:
3172+ rm -f *.gcov
3173+
3174+# Tell versions [3.59,3.63) of GNU make to not export all variables.
3175+# Otherwise a system limit (for SysV at least) may be exceeded.
3176+.NOEXPORT:
3177
3178=== added file 'util/mntctl.c'
3179--- util/mntctl.c 1970-01-01 00:00:00 +0000
3180+++ util/mntctl.c 2011-07-15 11:51:33 +0000
3181@@ -0,0 +1,387 @@
3182+/* mountall
3183+ *
3184+ * Copyright © 2010 Canonical Ltd.
3185+ *
3186+ * This file is based on initctl.c in upstart whose
3187+ * Author: Scott James Remnant <scott@netsplit.com>
3188+ *
3189+ * This program is free software; you can redistribute it and/or modify
3190+ * it under the terms of the GNU General Public License version 2, as
3191+ * published by the Free Software Foundation.
3192+ *
3193+ * This program is distributed in the hope that it will be useful,
3194+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3195+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3196+ * GNU General Public License for more details.
3197+ *
3198+ * You should have received a copy of the GNU General Public License along
3199+ * with this program; if not, write to the Free Software Foundation, Inc.,
3200+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
3201+ */
3202+
3203+#ifdef HAVE_CONFIG_H
3204+# include <config.h>
3205+#endif /* HAVE_CONFIG_H */
3206+
3207+
3208+#include <dbus/dbus.h>
3209+
3210+#include <sys/types.h>
3211+
3212+#include <stdio.h>
3213+#include <stdlib.h>
3214+#include <unistd.h>
3215+#include <unistd.h>
3216+#include <fnmatch.h>
3217+
3218+#include <nih/macros.h>
3219+#include <nih/alloc.h>
3220+#include <nih/string.h>
3221+#include <nih/main.h>
3222+#include <nih/option.h>
3223+#include <nih/command.h>
3224+#include <nih/logging.h>
3225+#include <nih/error.h>
3226+#include <nih/hash.h>
3227+#include <nih/tree.h>
3228+
3229+#include <nih-dbus/dbus_error.h>
3230+#include <nih-dbus/dbus_proxy.h>
3231+#include <nih-dbus/errors.h>
3232+#include <nih-dbus/dbus_connection.h>
3233+
3234+#include "dbus/mountall.h"
3235+
3236+#include "com.ubuntu.Mountall.Server.h"
3237+
3238+
3239+/* Prototypes for option and command functions */
3240+int stop_timer_action (NihCommand *command, char * const *args);
3241+int restart_timer_action (NihCommand *command, char * const *args);
3242+int change_mount_device_action (NihCommand *command, char * const *args);
3243+
3244+/**
3245+ * dest_name:
3246+ *
3247+ * Name on the D-Bus system bus that the message should be sent to when
3248+ * system is TRUE.
3249+ **/
3250+char *dest_name = NULL;
3251+
3252+/**
3253+ * mountall_open:
3254+ * @parent: parent object for new proxy.
3255+ *
3256+ * Opens a connection to the init daemon and returns a proxy to the manager
3257+ * object. If @dest_name is not NULL, a connection is instead opened to
3258+ * the system bus and the proxy linked to the well-known name given.
3259+ *
3260+ * Error messages are output to standard error.
3261+ *
3262+ * If @parent is not NULL, it should be a pointer to another object which
3263+ * will be used as a parent for the returned proxy. When all parents
3264+ * of the returned proxy are freed, the returned proxy will also be
3265+ * freed.
3266+ *
3267+ * Returns: newly allocated D-Bus proxy or NULL on error.
3268+ **/
3269+NihDBusProxy *
3270+mountall_open (const void *parent)
3271+{
3272+ DBusError dbus_error;
3273+ DBusConnection *connection;
3274+ NihDBusProxy * mountall;
3275+ int uid = getuid ();
3276+
3277+ dbus_error_init (&dbus_error);
3278+ if (uid) {
3279+ nih_error ("Need to be root to execute this command ");
3280+ return NULL;
3281+ }
3282+
3283+ connection = dbus_connection_open (DBUS_ADDRESS_MNTALL, &dbus_error);
3284+ if (! connection) {
3285+ nih_error ("%s: %s", _("Unable to connect to mountall"),
3286+ dbus_error.message);
3287+ dbus_error_free (&dbus_error);
3288+ return NULL;
3289+ }
3290+ dbus_error_free (&dbus_error);
3291+
3292+ mountall = nih_dbus_proxy_new (parent, connection,
3293+ dest_name,
3294+ DBUS_PATH_MNTALL,
3295+ NULL, NULL);
3296+ if (! mountall) {
3297+ NihError *err;
3298+
3299+ err = nih_error_get ();
3300+ nih_error ("%s", err->message);
3301+ nih_free (err);
3302+
3303+ dbus_connection_unref (connection);
3304+ return NULL;
3305+ }
3306+ nih_debug("Proxy for Mountall0_1.Server created!");
3307+ mountall->auto_start = FALSE;
3308+
3309+ /* Drop initial reference now the proxy holds one */
3310+ dbus_connection_unref (connection);
3311+ return mountall;
3312+}
3313+
3314+/**
3315+ * stop_timer_action:
3316+ * @command: NihCommand invoked,
3317+ * @args: command-line arguments.
3318+ *
3319+ * This function is called for the "stop-timer" command.
3320+ *
3321+ * Returns: 1 on error and 0 on success.
3322+ **/
3323+int
3324+stop_timer_action (NihCommand * command,
3325+ char * const *args)
3326+{
3327+ nih_local NihDBusProxy *mountall = NULL;
3328+ NihError * err;
3329+
3330+ nih_assert (command != NULL);
3331+ nih_assert (args != NULL);
3332+
3333+ if (!args[0]) {
3334+ fprintf (stderr, _("%s: missing device name \n"), program_name);
3335+ nih_main_suggest_help ();
3336+ return 1;
3337+ }
3338+ mountall = mountall_open (NULL);
3339+ if (! mountall)
3340+ return 1;
3341+ if (mountall_server_stop_timer_sync (NULL, mountall, args[0]))
3342+ goto error;
3343+ return 0;
3344+error:
3345+ err = nih_error_get ();
3346+ nih_error ("%s", err->message);
3347+ nih_free (err);
3348+ return 1;
3349+}
3350+
3351+/**
3352+ * restart_timer_action:
3353+ * @command: NihCommand invoked,
3354+ * @args: command-line arguments.
3355+ *
3356+ * This function is called for the "restart-timer" command.
3357+ *
3358+ * Returns: 1 on error and 0 on success.
3359+ **/
3360+int
3361+restart_timer_action (NihCommand * command,
3362+ char * const *args)
3363+{
3364+ nih_local NihDBusProxy *mountall = NULL;
3365+ NihError * err;
3366+
3367+ nih_assert (command != NULL);
3368+ nih_assert (args != NULL);
3369+
3370+ if (!args[0]) {
3371+ fprintf (stderr, _("%s: missing device name \n"), program_name);
3372+ nih_main_suggest_help ();
3373+ return 1;
3374+ }
3375+ mountall = mountall_open (NULL);
3376+ if (! mountall)
3377+ return 1;
3378+
3379+ if (mountall_server_restart_timer_sync (NULL, mountall, args[0]))
3380+ goto error;
3381+ return 0;
3382+error:
3383+ err = nih_error_get ();
3384+ nih_error ("%s", err->message);
3385+ nih_free (err);
3386+ return 1;
3387+}
3388+
3389+/**
3390+ * change_mount_dev_action:
3391+ * @command: NihCommand invoked,
3392+ * @args: command-line arguments.
3393+ *
3394+ * This function is called for the "change-mount" command.
3395+ *
3396+ * Returns: 1 on error and 0 on success.
3397+ **/
3398+int
3399+change_mount_dev_action (NihCommand * command,
3400+ char * const *args)
3401+{
3402+ nih_local NihDBusProxy *mountall = NULL;
3403+ NihError * err;
3404+
3405+ nih_assert (command != NULL);
3406+ nih_assert (args != NULL);
3407+
3408+ if (!args[0]) {
3409+ fprintf (stderr, _("%s: missing device name \n"), program_name);
3410+ nih_main_suggest_help ();
3411+ return 1;
3412+ }
3413+ if (!args[1]) {
3414+ fprintf (stderr, _("%s: missing mount point \n"), program_name);
3415+ nih_main_suggest_help ();
3416+ return 1;
3417+ }
3418+ mountall = mountall_open (NULL);
3419+ if (! mountall)
3420+ return 1;
3421+ if (mountall_server_change_mount_device_sync (NULL, mountall,
3422+ args[0], args[1]))
3423+ goto error;
3424+ return 0;
3425+error:
3426+ err = nih_error_get ();
3427+ nih_error ("%s", err->message);
3428+ nih_free (err);
3429+ return 1;
3430+}
3431+
3432+/**
3433+ * version_action:
3434+ * @command: NihCommand invoked,
3435+ * @args: command-line arguments.
3436+ *
3437+ * This function is called for the "version" command.
3438+ *
3439+ * Returns: command exit status.
3440+ **/
3441+int
3442+version_action (NihCommand * command,
3443+ char * const *args)
3444+{
3445+ nih_local NihDBusProxy *mountall = NULL;
3446+ nih_local char * version = NULL;
3447+ NihError * err;
3448+
3449+ nih_assert (command != NULL);
3450+ nih_assert (args != NULL);
3451+
3452+ mountall = mountall_open (NULL);
3453+ if (! mountall)
3454+ return 1;
3455+
3456+ if (mountall_server_get_version_sync (NULL, mountall, &version) < 0)
3457+ goto error;
3458+
3459+ nih_message ("%s", version);
3460+
3461+ return 0;
3462+
3463+error:
3464+ err = nih_error_get ();
3465+ nih_error ("%s", err->message);
3466+ nih_free (err);
3467+
3468+ return 1;
3469+}
3470+
3471+#ifndef TEST
3472+/**
3473+ * options:
3474+ *
3475+ * Command-line options accepted for all arguments.
3476+ **/
3477+static NihOption options[] = {
3478+ NIH_OPTION_LAST
3479+};
3480+
3481+
3482+NihOption stop_timer_options[] = {
3483+ NIH_OPTION_LAST
3484+};
3485+
3486+NihOption restart_timer_options[] = {
3487+ NIH_OPTION_LAST
3488+};
3489+
3490+NihOption change_mnt_dev_options[] = {
3491+ NIH_OPTION_LAST
3492+};
3493+
3494+/**
3495+ * version_options:
3496+ *
3497+ * Command-line options accepted for the version command.
3498+ **/
3499+NihOption version_options[] = {
3500+ NIH_OPTION_LAST
3501+};
3502+
3503+/**
3504+ * timer_group:
3505+ *
3506+ * Group of commands related to the timer
3507+ **/
3508+static NihCommandGroup timer_commands = { N_("Timer") };
3509+
3510+/**
3511+ * mounts_group:
3512+ *
3513+ * Group of commands related to mount devices and paths.
3514+ **/
3515+static NihCommandGroup mount_commands = { N_("Mounts") };
3516+
3517+
3518+/**
3519+ * commands:
3520+ *
3521+ * Commands accepts as the first non-option argument, or program name.
3522+ **/
3523+static NihCommand commands[] = {
3524+ { "stop-timer", N_("MOUNTPOINT"),
3525+ N_("Stop a timer associated with the specified device"),
3526+ N_("MOUNTPOINT is the mountpoint corresponding to a device whose "
3527+ "timer you want to stop"),
3528+ &timer_commands, stop_timer_options, stop_timer_action },
3529+
3530+ { "restart-timer", N_("MOUNTPOINT"),
3531+ N_("Restart a timer associated with the specified device"),
3532+ N_("MOUNTPOINT is the mountpoint corresponding to a device that "
3533+ "should become ready withing the default wait time or the time "
3534+ "specified explicitly as a command line argument to mountall") ,
3535+ &timer_commands, restart_timer_options, restart_timer_action },
3536+
3537+ { "change-mount", N_("DEVICE-NAME PATH"),
3538+ N_("Change the device to mount at a given mountpoint specified in "
3539+ "/etc/fstab" ),
3540+ N_("DEVICE-NAME is the name of the new device that you want to mount "
3541+ "PATH is the full path specified in /etc/fstab") ,
3542+ &mount_commands, change_mnt_dev_options, change_mount_dev_action },
3543+
3544+ { "version", NULL,
3545+ N_("Request the version of the mountall daemon."),
3546+ NULL,
3547+ NULL, version_options, version_action },
3548+
3549+ NIH_COMMAND_LAST
3550+};
3551+
3552+int
3553+main (int argc,
3554+ char *argv[])
3555+{
3556+ int ret;
3557+
3558+ nih_main_init (argv[0]);
3559+
3560+ ret = nih_command_parser (NULL, argc, argv, options, commands);
3561+ if (ret < 0)
3562+ exit (1);
3563+
3564+ dbus_shutdown ();
3565+
3566+ return ret;
3567+}
3568+#endif

Subscribers

People subscribed via source and target branches