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
=== modified file 'Makefile.am'
--- Makefile.am 2009-11-29 20:02:43 +0000
+++ Makefile.am 2011-07-15 11:51:33 +0000
@@ -1,6 +1,6 @@
1## Process this file with automake to produce Makefile.in1## Process this file with automake to produce Makefile.in
22
3SUBDIRS = intl dbus src conf man po3SUBDIRS = intl dbus util src conf debian/initramfs debian/initramfs/upstart-jobs/ man po
44
5EXTRA_DIST = config.rpath5EXTRA_DIST = config.rpath
66
77
=== modified file 'Makefile.in'
--- Makefile.in 2011-03-01 21:34:04 +0000
+++ Makefile.in 2011-07-15 11:51:33 +0000
@@ -301,7 +301,7 @@
301top_build_prefix = @top_build_prefix@301top_build_prefix = @top_build_prefix@
302top_builddir = @top_builddir@302top_builddir = @top_builddir@
303top_srcdir = @top_srcdir@303top_srcdir = @top_srcdir@
304SUBDIRS = intl dbus src conf man po304SUBDIRS = intl dbus util src conf debian/initramfs debian/initramfs/upstart-jobs/ man po
305EXTRA_DIST = config.rpath305EXTRA_DIST = config.rpath
306ACLOCAL_AMFLAGS = --install -I m4306ACLOCAL_AMFLAGS = --install -I m4
307all: config.h307all: config.h
308308
=== modified file 'configure'
--- configure 2011-04-13 12:59:22 +0000
+++ configure 2011-07-15 11:51:33 +0000
@@ -708,7 +708,7 @@
708PACKAGE_BUGREPORT='ubuntu-devel@lists.ubuntu.com'708PACKAGE_BUGREPORT='ubuntu-devel@lists.ubuntu.com'
709PACKAGE_URL=''709PACKAGE_URL=''
710710
711ac_unique_file="src/mountall.c"711ac_unique_file="util/mntctl.c"
712# Factoring default headers for most tests.712# Factoring default headers for most tests.
713ac_includes_default="\713ac_includes_default="\
714#include <stdio.h>714#include <stdio.h>
@@ -17545,7 +17545,7 @@
1754517545
1754617546
1754717547
17548ac_config_files="$ac_config_files Makefile intl/Makefile dbus/Makefile src/Makefile conf/Makefile man/Makefile po/Makefile.in"17548ac_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"
1754917549
17550ac_config_headers="$ac_config_headers config.h"17550ac_config_headers="$ac_config_headers config.h"
1755117551
@@ -18540,8 +18540,11 @@
18540 "dbus/Makefile") CONFIG_FILES="$CONFIG_FILES dbus/Makefile" ;;18540 "dbus/Makefile") CONFIG_FILES="$CONFIG_FILES dbus/Makefile" ;;
18541 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;18541 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
18542 "conf/Makefile") CONFIG_FILES="$CONFIG_FILES conf/Makefile" ;;18542 "conf/Makefile") CONFIG_FILES="$CONFIG_FILES conf/Makefile" ;;
18543 "util/Makefile") CONFIG_FILES="$CONFIG_FILES util/Makefile" ;;
18543 "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;18544 "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
18544 "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;18545 "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
18546 "debian/initramfs/Makefile") CONFIG_FILES="$CONFIG_FILES debian/initramfs/Makefile" ;;
18547 "debian/initramfs/upstart-jobs/Makefile") CONFIG_FILES="$CONFIG_FILES debian/initramfs/upstart-jobs/Makefile" ;;
18545 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;18548 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
1854618549
18547 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;18550 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
1854818551
=== modified file 'configure.ac'
--- configure.ac 2011-04-13 12:59:22 +0000
+++ configure.ac 2011-07-15 11:51:33 +0000
@@ -3,7 +3,7 @@
3AC_PREREQ(2.62)3AC_PREREQ(2.62)
4AC_INIT([mountall], [2.26], [ubuntu-devel@lists.ubuntu.com])4AC_INIT([mountall], [2.26], [ubuntu-devel@lists.ubuntu.com])
5AC_COPYRIGHT([[Copyright © 2010 Canonical Ltd.]])5AC_COPYRIGHT([[Copyright © 2010 Canonical Ltd.]])
6AC_CONFIG_SRCDIR([src/mountall.c])6AC_CONFIG_SRCDIR([util/mntctl.c])
7AC_CONFIG_MACRO_DIR([m4])7AC_CONFIG_MACRO_DIR([m4])
88
9AC_GNU_SOURCE9AC_GNU_SOURCE
@@ -49,6 +49,8 @@
4949
50AC_CONFIG_FILES([ Makefile intl/Makefile50AC_CONFIG_FILES([ Makefile intl/Makefile
51 dbus/Makefile src/Makefile conf/Makefile51 dbus/Makefile src/Makefile conf/Makefile
52 man/Makefile po/Makefile.in ])52 util/Makefile man/Makefile po/Makefile.in
53 debian/initramfs/Makefile
54 debian/initramfs/upstart-jobs/Makefile])
53AC_CONFIG_HEADERS([config.h])55AC_CONFIG_HEADERS([config.h])
54AC_OUTPUT56AC_OUTPUT
5557
=== modified file 'dbus/Makefile.am'
--- dbus/Makefile.am 2009-09-14 22:31:57 +0000
+++ dbus/Makefile.am 2011-07-15 11:51:33 +0000
@@ -1,5 +1,9 @@
1## Process this file with automake to produce Makefile.in1## Process this file with automake to produce Makefile.in
22
3
4dbus_configdir = $(sysconfdir)/dbus-1/system.d
5dist_dbus_config_DATA = Mountall.Server.conf
6
3EXTRA_DIST = \7EXTRA_DIST = \
4 upstart.h \8 upstart.h \
5 com.ubuntu.Upstart.xml9 com.ubuntu.Upstart.xml
610
=== modified file 'dbus/Makefile.in'
--- dbus/Makefile.in 2011-03-01 21:34:04 +0000
+++ dbus/Makefile.in 2011-07-15 11:51:33 +0000
@@ -14,6 +14,7 @@
14# PARTICULAR PURPOSE.14# PARTICULAR PURPOSE.
1515
16@SET_MAKE@16@SET_MAKE@
17
17VPATH = @srcdir@18VPATH = @srcdir@
18pkgdatadir = $(datadir)/@PACKAGE@19pkgdatadir = $(datadir)/@PACKAGE@
19pkgincludedir = $(includedir)/@PACKAGE@20pkgincludedir = $(includedir)/@PACKAGE@
@@ -34,7 +35,8 @@
34build_triplet = @build@35build_triplet = @build@
35host_triplet = @host@36host_triplet = @host@
36subdir = dbus37subdir = dbus
37DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in38DIST_COMMON = $(dist_dbus_config_DATA) $(srcdir)/Makefile.am \
39 $(srcdir)/Makefile.in
38ACLOCAL_M4 = $(top_srcdir)/aclocal.m440ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
39am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \41am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
40 $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc2.m4 \42 $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc2.m4 \
@@ -70,6 +72,29 @@
70am__v_at_0 = @72am__v_at_0 = @
71SOURCES =73SOURCES =
72DIST_SOURCES =74DIST_SOURCES =
75am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
76am__vpath_adj = case $$p in \
77 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
78 *) f=$$p;; \
79 esac;
80am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
81am__install_max = 40
82am__nobase_strip_setup = \
83 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
84am__nobase_strip = \
85 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
86am__nobase_list = $(am__nobase_strip_setup); \
87 for p in $$list; do echo "$$p $$p"; done | \
88 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
89 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
90 if (++n[$$2] == $(am__install_max)) \
91 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
92 END { for (dir in files) print dir, files[dir] }'
93am__base_list = \
94 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
95 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
96am__installdirs = "$(DESTDIR)$(dbus_configdir)"
97DATA = $(dist_dbus_config_DATA)
73DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)98DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
74ACLOCAL = @ACLOCAL@99ACLOCAL = @ACLOCAL@
75ALLOCA = @ALLOCA@100ALLOCA = @ALLOCA@
@@ -245,6 +270,8 @@
245top_build_prefix = @top_build_prefix@270top_build_prefix = @top_build_prefix@
246top_builddir = @top_builddir@271top_builddir = @top_builddir@
247top_srcdir = @top_srcdir@272top_srcdir = @top_srcdir@
273dbus_configdir = $(sysconfdir)/dbus-1/system.d
274dist_dbus_config_DATA = Mountall.Server.conf
248EXTRA_DIST = \275EXTRA_DIST = \
249 upstart.h \276 upstart.h \
250 com.ubuntu.Upstart.xml277 com.ubuntu.Upstart.xml
@@ -288,6 +315,26 @@
288315
289clean-libtool:316clean-libtool:
290 -rm -rf .libs _libs317 -rm -rf .libs _libs
318install-dist_dbus_configDATA: $(dist_dbus_config_DATA)
319 @$(NORMAL_INSTALL)
320 test -z "$(dbus_configdir)" || $(MKDIR_P) "$(DESTDIR)$(dbus_configdir)"
321 @list='$(dist_dbus_config_DATA)'; test -n "$(dbus_configdir)" || list=; \
322 for p in $$list; do \
323 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
324 echo "$$d$$p"; \
325 done | $(am__base_list) | \
326 while read files; do \
327 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dbus_configdir)'"; \
328 $(INSTALL_DATA) $$files "$(DESTDIR)$(dbus_configdir)" || exit $$?; \
329 done
330
331uninstall-dist_dbus_configDATA:
332 @$(NORMAL_UNINSTALL)
333 @list='$(dist_dbus_config_DATA)'; test -n "$(dbus_configdir)" || list=; \
334 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
335 test -n "$$files" || exit 0; \
336 echo " ( cd '$(DESTDIR)$(dbus_configdir)' && rm -f" $$files ")"; \
337 cd "$(DESTDIR)$(dbus_configdir)" && rm -f $$files
291tags: TAGS338tags: TAGS
292TAGS:339TAGS:
293340
@@ -327,8 +374,11 @@
327 done374 done
328check-am: all-am375check-am: all-am
329check: check-am376check: check-am
330all-am: Makefile377all-am: Makefile $(DATA)
331installdirs:378installdirs:
379 for dir in "$(DESTDIR)$(dbus_configdir)"; do \
380 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
381 done
332install: install-am382install: install-am
333install-exec: install-exec-am383install-exec: install-exec-am
334install-data: install-data-am384install-data: install-data-am
@@ -374,7 +424,7 @@
374424
375info-am:425info-am:
376426
377install-data-am:427install-data-am: install-dist_dbus_configDATA
378428
379install-dvi: install-dvi-am429install-dvi: install-dvi-am
380430
@@ -418,20 +468,21 @@
418468
419ps-am:469ps-am:
420470
421uninstall-am:471uninstall-am: uninstall-dist_dbus_configDATA
422472
423.MAKE: install-am install-strip473.MAKE: install-am install-strip
424474
425.PHONY: all all-am check check-am clean clean-generic clean-libtool \475.PHONY: all all-am check check-am clean clean-generic clean-libtool \
426 distclean distclean-generic distclean-libtool distdir dvi \476 distclean distclean-generic distclean-libtool distdir dvi \
427 dvi-am html html-am info info-am install install-am \477 dvi-am html html-am info info-am install install-am \
428 install-data install-data-am install-dvi install-dvi-am \478 install-data install-data-am install-dist_dbus_configDATA \
429 install-exec install-exec-am install-html install-html-am \479 install-dvi install-dvi-am install-exec install-exec-am \
430 install-info install-info-am install-man install-pdf \480 install-html install-html-am install-info install-info-am \
431 install-pdf-am install-ps install-ps-am install-strip \481 install-man install-pdf install-pdf-am install-ps \
432 installcheck installcheck-am installdirs maintainer-clean \482 install-ps-am install-strip installcheck installcheck-am \
433 maintainer-clean-generic mostlyclean mostlyclean-generic \483 installdirs maintainer-clean maintainer-clean-generic \
434 mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am484 mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
485 ps ps-am uninstall uninstall-am uninstall-dist_dbus_configDATA
435486
436487
437# Tell versions [3.59,3.63) of GNU make to not export all variables.488# Tell versions [3.59,3.63) of GNU make to not export all variables.
438489
=== added file 'dbus/Mountall.Server.conf'
--- dbus/Mountall.Server.conf 1970-01-01 00:00:00 +0000
+++ dbus/Mountall.Server.conf 2011-07-15 11:51:33 +0000
@@ -0,0 +1,35 @@
1<?xml version="1.0" encoding="UTF-8" ?>
2<!DOCTYPE busconfig PUBLIC
3 "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
4 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
5
6<busconfig>
7 <!-- Only the root user can own the Mountall name -->
8 <policy user="root">
9 <allow own="com.ubuntu.Mountall.Server" />
10 </policy>
11
12 <!-- Permit the root user to invoke all of the methods on Mountall-->
13 <policy user="root">
14 <allow send_destination="com.ubuntu.Mountall.Server"
15 send_interface="org.freedesktop.DBus.Properties" />
16
17 <allow send_destination="com.ubuntu.Mountall.Server"
18 send_interface="com.ubuntu.Mountall0_1.Server" />
19 </policy>
20
21 <!-- Allow any user to introspect Mountall's interfaces, to obtain the
22 values of properties (but not set them) and to invoke selected
23 methods on Mountall that are used to walk information. -->
24 <policy context="default">
25 <allow send_destination="com.ubuntu.Mountall.Server"
26 send_interface="org.freedesktop.DBus.Introspectable" />
27
28 <allow send_destination="com.ubuntu.Mountall.Server"
29 send_interface="org.freedesktop.DBus.Properties"
30 send_type="method_call" send_member="Get" />
31 <allow send_destination="com.ubuntu.Mountall.Server"
32 send_interface="org.freedesktop.DBus.Properties"
33 send_type="method_call" send_member="GetAll" />
34 </policy>
35</busconfig>
036
=== added file 'dbus/com.ubuntu.Mountall.Server.xml'
--- dbus/com.ubuntu.Mountall.Server.xml 1970-01-01 00:00:00 +0000
+++ dbus/com.ubuntu.Mountall.Server.xml 2011-07-15 11:51:33 +0000
@@ -0,0 +1,38 @@
1<?xml version="1.0" encoding="UTF-8" ?>
2<!-- mountall
3
4 com.ubuntu.Mountall.Server.xml - interface definition for Mountall Server
5
6 Copyright © 2011 Canonical Ltd.
7
8 This file is free software; Canonical Ltd gives unlimited permission
9 to copy and/or distribute it, with or without modifications, as long
10 as this notice is preserved.
11
12 Communication and interaction with Mountall through this interface is
13 permitted without restriction.
14 -->
15
16<!DOCTYPE node PUBLIC
17 "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
18 "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
19
20<node>
21 <interface name="com.ubuntu.Mountall0_1.Server">
22 <method name="StopTimer">
23 <arg name="mountpoint" type="s" direction="in" />
24 </method>
25
26 <method name="RestartTimer">
27 <arg name="mountpoint" type="s" direction="in" />
28 </method>
29
30 <method name="ChangeMountDevice">
31 <arg name="devname" type="s" direction="in" />
32 <arg name="path" type="s" direction="in" />
33 </method>
34
35 <!-- Basic information about Mountall-->
36 <property name="version" type="s" access="read" />
37 </interface>
38</node>
039
=== added file 'dbus/mountall.h'
--- dbus/mountall.h 1970-01-01 00:00:00 +0000
+++ dbus/mountall.h 2011-07-15 11:51:33 +0000
@@ -0,0 +1,49 @@
1/* mountall.h
2 *
3 * Copyright © 2009 Canonical Ltd.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2, as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18
19#ifndef DBUS_MNTALL_H
20#define DBUS_MNTALL_H
21
22/**
23 * DBUS_PATH_MNTALL:
24 *
25 * The object path used by the manager object, and used as the root path
26 * for all other objects.
27 **/
28#define DBUS_PATH_MNTALL "/com/ubuntu/Mountall/Server"
29
30
31/**
32 * DBUS_INTERFACE_MNTALL:
33 *
34 * The interface exported by the manager object.
35 **/
36#define DBUS_INTERFACE_MNTALL "com.ubuntu.Mountall0_1.Server"
37
38/**
39 * DBUS_ADDRESS_MNTALL:
40 *
41 * The address where the private D-Bus server inside Mountall can be
42 * found.
43 **/
44#ifndef DBUS_ADDRESS_MNTALL
45#define DBUS_ADDRESS_MNTALL "unix:abstract=/com/ubuntu/mountall/server/"
46#endif
47
48
49#endif /* DBUS_MNTALL_H */
050
=== modified file 'debian/changelog'
--- debian/changelog 2011-04-13 12:59:22 +0000
+++ debian/changelog 2011-07-15 11:51:33 +0000
@@ -1,3 +1,29 @@
1mountall (2.27) UNRELEASED; urgency=low
2
3 * Added com.ubuntu.Mountall.server interface. Implemented the mntctl command
4 with 4 commands: 1. StopTimer 2. RestartTimer 3. ChangeMountDevice 4.
5 Version.
6 * Fixed the coding style bugs in the "timeout" option related code. Also
7 removed a break from the is_device_ready () to get the "device-not-ready"
8 event for all the devices which are marked with the timeout option and
9 which are not ready by the time the timer expires.
10 * Added debian/initramfs/Makefile.am to install mountall.initramfs-hook as
11 an initramfs hook that installs mntctl, mountall and other files needed by
12 an event driven initramfs. Also added
13 debian/initramfs/upstart-jobs/Makefile.am to install the upstart-jobs
14 related to mountall in the event driven initramfs. The current
15 mountall.conf execute as an upstart job in place of the "local" script in
16 the non-event driven initramfs
17
18 -- Surbhi Palande <surbhi.palande@canonical.com> Wed, 29 Jun 2011 16:40:01 +0300
19
20mountall (2.26) oneiric; urgency=low
21
22 * Correct grammar on user-visible strings
23 (LP: #572016)
24
25 -- Bryce Harrington <bryce@ubuntu.com> Tue, 07 Jun 2011 12:16:22 -0700
26
1mountall (2.25ubuntu1) natty; urgency=low27mountall (2.25ubuntu1) natty; urgency=low
228
3 * Fixed two errors found while browsing the code: 1) find_mount("/") returns29 * Fixed two errors found while browsing the code: 1) find_mount("/") returns
430
=== added directory 'debian/initramfs'
=== added file 'debian/initramfs/Makefile.am'
--- debian/initramfs/Makefile.am 1970-01-01 00:00:00 +0000
+++ debian/initramfs/Makefile.am 2011-07-15 11:51:33 +0000
@@ -0,0 +1,4 @@
1## Process this file with automake to produce Makefile.in
2
3initramfshookdir = /usr/share/initramfs-tools/hooks
4initramfshook_SCRIPTS = mountall
05
=== added file 'debian/initramfs/Makefile.in'
--- debian/initramfs/Makefile.in 1970-01-01 00:00:00 +0000
+++ debian/initramfs/Makefile.in 2011-07-15 11:51:33 +0000
@@ -0,0 +1,499 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18VPATH = @srcdir@
19pkgdatadir = $(datadir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21pkglibdir = $(libdir)/@PACKAGE@
22pkglibexecdir = $(libexecdir)/@PACKAGE@
23am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24install_sh_DATA = $(install_sh) -c -m 644
25install_sh_PROGRAM = $(install_sh) -c
26install_sh_SCRIPT = $(install_sh) -c
27INSTALL_HEADER = $(INSTALL_DATA)
28transform = $(program_transform_name)
29NORMAL_INSTALL = :
30PRE_INSTALL = :
31POST_INSTALL = :
32NORMAL_UNINSTALL = :
33PRE_UNINSTALL = :
34POST_UNINSTALL = :
35build_triplet = @build@
36host_triplet = @host@
37subdir = debian/initramfs
38DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
39ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
40am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
41 $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc2.m4 \
42 $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \
43 $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intl.m4 \
44 $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax.m4 \
45 $(top_srcdir)/m4/inttypes-pri.m4 \
46 $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \
47 $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
48 $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libnih.m4 \
49 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/lock.m4 \
50 $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \
51 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
52 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
53 $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \
54 $(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \
55 $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \
56 $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \
57 $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/m4/wchar_t.m4 \
58 $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \
59 $(top_srcdir)/configure.ac
60am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
61 $(ACLOCAL_M4)
62mkinstalldirs = $(install_sh) -d
63CONFIG_HEADER = $(top_builddir)/config.h
64CONFIG_CLEAN_FILES =
65CONFIG_CLEAN_VPATH_FILES =
66am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
67am__vpath_adj = case $$p in \
68 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
69 *) f=$$p;; \
70 esac;
71am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
72am__install_max = 40
73am__nobase_strip_setup = \
74 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
75am__nobase_strip = \
76 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
77am__nobase_list = $(am__nobase_strip_setup); \
78 for p in $$list; do echo "$$p $$p"; done | \
79 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
80 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
81 if (++n[$$2] == $(am__install_max)) \
82 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
83 END { for (dir in files) print dir, files[dir] }'
84am__base_list = \
85 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
86 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
87am__installdirs = "$(DESTDIR)$(initramfshookdir)"
88SCRIPTS = $(initramfshook_SCRIPTS)
89AM_V_GEN = $(am__v_GEN_$(V))
90am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
91am__v_GEN_0 = @echo " GEN " $@;
92AM_V_at = $(am__v_at_$(V))
93am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
94am__v_at_0 = @
95SOURCES =
96DIST_SOURCES =
97DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
98ACLOCAL = @ACLOCAL@
99ALLOCA = @ALLOCA@
100AMTAR = @AMTAR@
101AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
102AR = @AR@
103AUTOCONF = @AUTOCONF@
104AUTOHEADER = @AUTOHEADER@
105AUTOMAKE = @AUTOMAKE@
106AWK = @AWK@
107BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
108CATOBJEXT = @CATOBJEXT@
109CC = @CC@
110CCDEPMODE = @CCDEPMODE@
111CFLAGS = @CFLAGS@
112CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
113CPP = @CPP@
114CPPFLAGS = @CPPFLAGS@
115CYGPATH_W = @CYGPATH_W@
116DATADIRNAME = @DATADIRNAME@
117DBUS_CFLAGS = @DBUS_CFLAGS@
118DBUS_LIBS = @DBUS_LIBS@
119DEFS = @DEFS@
120DEPDIR = @DEPDIR@
121DSYMUTIL = @DSYMUTIL@
122DUMPBIN = @DUMPBIN@
123ECHO_C = @ECHO_C@
124ECHO_N = @ECHO_N@
125ECHO_T = @ECHO_T@
126EGREP = @EGREP@
127EXEEXT = @EXEEXT@
128FGREP = @FGREP@
129GENCAT = @GENCAT@
130GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
131GLIBC2 = @GLIBC2@
132GLIBC21 = @GLIBC21@
133GMSGFMT = @GMSGFMT@
134GMSGFMT_015 = @GMSGFMT_015@
135GREP = @GREP@
136HAVE_ASPRINTF = @HAVE_ASPRINTF@
137HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
138HAVE_SNPRINTF = @HAVE_SNPRINTF@
139HAVE_VISIBILITY = @HAVE_VISIBILITY@
140HAVE_WPRINTF = @HAVE_WPRINTF@
141INSTALL = @INSTALL@
142INSTALL_DATA = @INSTALL_DATA@
143INSTALL_PROGRAM = @INSTALL_PROGRAM@
144INSTALL_SCRIPT = @INSTALL_SCRIPT@
145INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
146INSTOBJEXT = @INSTOBJEXT@
147INTLBISON = @INTLBISON@
148INTLLIBS = @INTLLIBS@
149INTLOBJS = @INTLOBJS@
150INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
151INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
152LD = @LD@
153LDFLAGS = @LDFLAGS@
154LIBICONV = @LIBICONV@
155LIBINTL = @LIBINTL@
156LIBMULTITHREAD = @LIBMULTITHREAD@
157LIBOBJS = @LIBOBJS@
158LIBPTH = @LIBPTH@
159LIBPTH_PREFIX = @LIBPTH_PREFIX@
160LIBS = @LIBS@
161LIBTHREAD = @LIBTHREAD@
162LIBTOOL = @LIBTOOL@
163LIPO = @LIPO@
164LN_S = @LN_S@
165LTLIBC = @LTLIBC@
166LTLIBICONV = @LTLIBICONV@
167LTLIBINTL = @LTLIBINTL@
168LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
169LTLIBOBJS = @LTLIBOBJS@
170LTLIBPTH = @LTLIBPTH@
171LTLIBTHREAD = @LTLIBTHREAD@
172MAINT = @MAINT@
173MAKEINFO = @MAKEINFO@
174MKDIR_P = @MKDIR_P@
175MSGFMT = @MSGFMT@
176MSGFMT_015 = @MSGFMT_015@
177MSGMERGE = @MSGMERGE@
178NIH_CFLAGS = @NIH_CFLAGS@
179NIH_DBUS_CFLAGS = @NIH_DBUS_CFLAGS@
180NIH_DBUS_LIBS = @NIH_DBUS_LIBS@
181NIH_DBUS_TOOL = @NIH_DBUS_TOOL@
182NIH_LIBS = @NIH_LIBS@
183NM = @NM@
184NMEDIT = @NMEDIT@
185OBJDUMP = @OBJDUMP@
186OBJEXT = @OBJEXT@
187OTOOL = @OTOOL@
188OTOOL64 = @OTOOL64@
189PACKAGE = @PACKAGE@
190PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
191PACKAGE_NAME = @PACKAGE_NAME@
192PACKAGE_STRING = @PACKAGE_STRING@
193PACKAGE_TARNAME = @PACKAGE_TARNAME@
194PACKAGE_URL = @PACKAGE_URL@
195PACKAGE_VERSION = @PACKAGE_VERSION@
196PATH_SEPARATOR = @PATH_SEPARATOR@
197PKG_CONFIG = @PKG_CONFIG@
198PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
199PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
200PLYMOUTH_CFLAGS = @PLYMOUTH_CFLAGS@
201PLYMOUTH_LIBS = @PLYMOUTH_LIBS@
202POSUB = @POSUB@
203PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
204RANLIB = @RANLIB@
205SED = @SED@
206SET_MAKE = @SET_MAKE@
207SHELL = @SHELL@
208STRIP = @STRIP@
209UDEV_CFLAGS = @UDEV_CFLAGS@
210UDEV_LIBS = @UDEV_LIBS@
211USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
212USE_NLS = @USE_NLS@
213VERSION = @VERSION@
214WINDRES = @WINDRES@
215WOE32 = @WOE32@
216WOE32DLL = @WOE32DLL@
217XGETTEXT = @XGETTEXT@
218XGETTEXT_015 = @XGETTEXT_015@
219XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
220abs_builddir = @abs_builddir@
221abs_srcdir = @abs_srcdir@
222abs_top_builddir = @abs_top_builddir@
223abs_top_srcdir = @abs_top_srcdir@
224ac_ct_CC = @ac_ct_CC@
225ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
226am__include = @am__include@
227am__leading_dot = @am__leading_dot@
228am__quote = @am__quote@
229am__tar = @am__tar@
230am__untar = @am__untar@
231bindir = @bindir@
232build = @build@
233build_alias = @build_alias@
234build_cpu = @build_cpu@
235build_os = @build_os@
236build_vendor = @build_vendor@
237builddir = @builddir@
238datadir = @datadir@
239datarootdir = @datarootdir@
240docdir = @docdir@
241dvidir = @dvidir@
242exec_prefix = @exec_prefix@
243host = @host@
244host_alias = @host_alias@
245host_cpu = @host_cpu@
246host_os = @host_os@
247host_vendor = @host_vendor@
248htmldir = @htmldir@
249includedir = @includedir@
250infodir = @infodir@
251install_sh = @install_sh@
252libdir = @libdir@
253libexecdir = @libexecdir@
254localedir = @localedir@
255localstatedir = @localstatedir@
256lt_ECHO = @lt_ECHO@
257mandir = @mandir@
258mkdir_p = @mkdir_p@
259oldincludedir = @oldincludedir@
260pdfdir = @pdfdir@
261prefix = @prefix@
262program_transform_name = @program_transform_name@
263psdir = @psdir@
264sbindir = @sbindir@
265sharedstatedir = @sharedstatedir@
266srcdir = @srcdir@
267sysconfdir = @sysconfdir@
268target_alias = @target_alias@
269top_build_prefix = @top_build_prefix@
270top_builddir = @top_builddir@
271top_srcdir = @top_srcdir@
272initramfshookdir = /usr/share/initramfs-tools/hooks
273initramfshook_SCRIPTS = mountall
274all: all-am
275
276.SUFFIXES:
277$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
278 @for dep in $?; do \
279 case '$(am__configure_deps)' in \
280 *$$dep*) \
281 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
282 && { if test -f $@; then exit 0; else break; fi; }; \
283 exit 1;; \
284 esac; \
285 done; \
286 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign debian/initramfs/Makefile'; \
287 $(am__cd) $(top_srcdir) && \
288 $(AUTOMAKE) --foreign debian/initramfs/Makefile
289.PRECIOUS: Makefile
290Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
291 @case '$?' in \
292 *config.status*) \
293 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
294 *) \
295 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
296 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
297 esac;
298
299$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
300 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
301
302$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
303 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
304$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
305 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
306$(am__aclocal_m4_deps):
307install-initramfshookSCRIPTS: $(initramfshook_SCRIPTS)
308 @$(NORMAL_INSTALL)
309 test -z "$(initramfshookdir)" || $(MKDIR_P) "$(DESTDIR)$(initramfshookdir)"
310 @list='$(initramfshook_SCRIPTS)'; test -n "$(initramfshookdir)" || list=; \
311 for p in $$list; do \
312 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
313 if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
314 done | \
315 sed -e 'p;s,.*/,,;n' \
316 -e 'h;s|.*|.|' \
317 -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
318 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
319 { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
320 if ($$2 == $$4) { files[d] = files[d] " " $$1; \
321 if (++n[d] == $(am__install_max)) { \
322 print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
323 else { print "f", d "/" $$4, $$1 } } \
324 END { for (d in files) print "f", d, files[d] }' | \
325 while read type dir files; do \
326 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
327 test -z "$$files" || { \
328 echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(initramfshookdir)$$dir'"; \
329 $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(initramfshookdir)$$dir" || exit $$?; \
330 } \
331 ; done
332
333uninstall-initramfshookSCRIPTS:
334 @$(NORMAL_UNINSTALL)
335 @list='$(initramfshook_SCRIPTS)'; test -n "$(initramfshookdir)" || exit 0; \
336 files=`for p in $$list; do echo "$$p"; done | \
337 sed -e 's,.*/,,;$(transform)'`; \
338 test -n "$$list" || exit 0; \
339 echo " ( cd '$(DESTDIR)$(initramfshookdir)' && rm -f" $$files ")"; \
340 cd "$(DESTDIR)$(initramfshookdir)" && rm -f $$files
341
342mostlyclean-libtool:
343 -rm -f *.lo
344
345clean-libtool:
346 -rm -rf .libs _libs
347tags: TAGS
348TAGS:
349
350ctags: CTAGS
351CTAGS:
352
353
354distdir: $(DISTFILES)
355 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
356 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
357 list='$(DISTFILES)'; \
358 dist_files=`for file in $$list; do echo $$file; done | \
359 sed -e "s|^$$srcdirstrip/||;t" \
360 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
361 case $$dist_files in \
362 */*) $(MKDIR_P) `echo "$$dist_files" | \
363 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
364 sort -u` ;; \
365 esac; \
366 for file in $$dist_files; do \
367 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
368 if test -d $$d/$$file; then \
369 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
370 if test -d "$(distdir)/$$file"; then \
371 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
372 fi; \
373 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
374 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
375 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
376 fi; \
377 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
378 else \
379 test -f "$(distdir)/$$file" \
380 || cp -p $$d/$$file "$(distdir)/$$file" \
381 || exit 1; \
382 fi; \
383 done
384check-am: all-am
385check: check-am
386all-am: Makefile $(SCRIPTS)
387installdirs:
388 for dir in "$(DESTDIR)$(initramfshookdir)"; do \
389 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
390 done
391install: install-am
392install-exec: install-exec-am
393install-data: install-data-am
394uninstall: uninstall-am
395
396install-am: all-am
397 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
398
399installcheck: installcheck-am
400install-strip:
401 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
402 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
403 `test -z '$(STRIP)' || \
404 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
405mostlyclean-generic:
406
407clean-generic:
408
409distclean-generic:
410 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
411 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
412
413maintainer-clean-generic:
414 @echo "This command is intended for maintainers to use"
415 @echo "it deletes files that may require special tools to rebuild."
416clean: clean-am
417
418clean-am: clean-generic clean-libtool mostlyclean-am
419
420distclean: distclean-am
421 -rm -f Makefile
422distclean-am: clean-am distclean-generic
423
424dvi: dvi-am
425
426dvi-am:
427
428html: html-am
429
430html-am:
431
432info: info-am
433
434info-am:
435
436install-data-am: install-initramfshookSCRIPTS
437
438install-dvi: install-dvi-am
439
440install-dvi-am:
441
442install-exec-am:
443
444install-html: install-html-am
445
446install-html-am:
447
448install-info: install-info-am
449
450install-info-am:
451
452install-man:
453
454install-pdf: install-pdf-am
455
456install-pdf-am:
457
458install-ps: install-ps-am
459
460install-ps-am:
461
462installcheck-am:
463
464maintainer-clean: maintainer-clean-am
465 -rm -f Makefile
466maintainer-clean-am: distclean-am maintainer-clean-generic
467
468mostlyclean: mostlyclean-am
469
470mostlyclean-am: mostlyclean-generic mostlyclean-libtool
471
472pdf: pdf-am
473
474pdf-am:
475
476ps: ps-am
477
478ps-am:
479
480uninstall-am: uninstall-initramfshookSCRIPTS
481
482.MAKE: install-am install-strip
483
484.PHONY: all all-am check check-am clean clean-generic clean-libtool \
485 distclean distclean-generic distclean-libtool distdir dvi \
486 dvi-am html html-am info info-am install install-am \
487 install-data install-data-am install-dvi install-dvi-am \
488 install-exec install-exec-am install-html install-html-am \
489 install-info install-info-am install-initramfshookSCRIPTS \
490 install-man install-pdf install-pdf-am install-ps \
491 install-ps-am install-strip installcheck installcheck-am \
492 installdirs maintainer-clean maintainer-clean-generic \
493 mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
494 ps ps-am uninstall uninstall-am uninstall-initramfshookSCRIPTS
495
496
497# Tell versions [3.59,3.63) of GNU make to not export all variables.
498# Otherwise a system limit (for SysV at least) may be exceeded.
499.NOEXPORT:
0500
=== added file 'debian/initramfs/mountall'
--- debian/initramfs/mountall 1970-01-01 00:00:00 +0000
+++ debian/initramfs/mountall 2011-07-15 11:51:33 +0000
@@ -0,0 +1,69 @@
1#!/bin/sh -e
2#event-driven initramfs hook for mountall
3
4PREREQ=""
5
6#Output prequisites
7prereqs()
8{
9 echo "$PREREQ"
10}
11
12if [ -z "$INITRAMFS_EVENT_DRIVEN" ]; then
13 exit 0;
14fi
15
16case $1 in
17 prereqs)
18 prereqs
19 exit 0
20 ;;
21esac
22
23. /usr/share/initramfs-tools/hook-functions
24
25copy_exec /sbin/mountall
26copy_exec /sbin/mntctl
27mkdir -p ${DESTDIR}/lib/init/
28mkdir -p ${DESTDIR}/etc/dbus-1/system.d/
29cp /etc/dbus-1/system.d/Mountall.Server.conf ${DESTDIR}/etc/dbus-1/system.d/
30
31# Following is needed for mountall authentication with dbus
32cp /etc/passwd ${DESTDIR}/etc/
33if ! grep -q '^root:' ${DESTDIR}/etc/passwd 2>/dev/null; then
34 echo 'root:x:0:0:root:/root:/bin/sh' >> ${DESTDIR}/etc/passwd
35fi
36# we use our own nsswitch - used for mountall authentication with dbus
37# this is our dummy nss stack - uses libnss_files.so
38
39echo 'passwd: files' >${DESTDIR}/etc/nsswitch.conf
40echo 'group: files' >>${DESTDIR}/etc/nsswitch.conf
41
42libnss_compat=`dpkg -L libc6 | grep libnss_compat.so.2`
43if [ -f $libnss_compat ]; then
44 cp -uv $libnss_compat ${DESTDIR}/lib/libnss_compat.so.2
45else
46 echo "libnss_compat.so.2 not found"
47 echo "warning: mountall would not be able to connect to upstart"
48 exit 1
49fi
50
51libnss_files=`dpkg -L libc6 | grep libnss_files.so.2`
52if [ -f $libnss_files ]; then
53 cp -uv $libnss_files ${DESTDIR}/lib/libnss_files.so.2
54else
55 echo "libnss_files.so.2 not found"
56 echo "warning: mountall would not be able to connect to upstart"
57 exit 1
58fi
59
60libuuid=`dpkg -L libuuid1 | grep "libuuid.so.1$"`
61if [ -f $libuuid ]; then
62 cp -uv $libuuid ${DESTDIR}/lib/libuuid.so.1
63else
64 echo "libuuid.so.1 not found"
65 echo "warning: root device may not be discovered if uuid is used in fstab"
66 exit 1
67fi
68
69cp /etc/blkid.conf ${DESTDIR}/etc/
070
=== added directory 'debian/initramfs/upstart-jobs'
=== added file 'debian/initramfs/upstart-jobs/Makefile.am'
--- debian/initramfs/upstart-jobs/Makefile.am 1970-01-01 00:00:00 +0000
+++ debian/initramfs/upstart-jobs/Makefile.am 2011-07-15 11:51:33 +0000
@@ -0,0 +1,4 @@
1## Process this file with automake to produce Makefile.in
2
3upstart_jobs_initramfs_configdir = /usr/share/initramfs-tools/event-driven/upstart-jobs/
4upstart_jobs_initramfs_config_DATA = mountall.conf
05
=== added file 'debian/initramfs/upstart-jobs/Makefile.in'
--- debian/initramfs/upstart-jobs/Makefile.in 1970-01-01 00:00:00 +0000
+++ debian/initramfs/upstart-jobs/Makefile.in 2011-07-15 11:51:33 +0000
@@ -0,0 +1,486 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18VPATH = @srcdir@
19pkgdatadir = $(datadir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21pkglibdir = $(libdir)/@PACKAGE@
22pkglibexecdir = $(libexecdir)/@PACKAGE@
23am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24install_sh_DATA = $(install_sh) -c -m 644
25install_sh_PROGRAM = $(install_sh) -c
26install_sh_SCRIPT = $(install_sh) -c
27INSTALL_HEADER = $(INSTALL_DATA)
28transform = $(program_transform_name)
29NORMAL_INSTALL = :
30PRE_INSTALL = :
31POST_INSTALL = :
32NORMAL_UNINSTALL = :
33PRE_UNINSTALL = :
34POST_UNINSTALL = :
35build_triplet = @build@
36host_triplet = @host@
37subdir = debian/initramfs/upstart-jobs
38DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
39ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
40am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
41 $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc2.m4 \
42 $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \
43 $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intl.m4 \
44 $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax.m4 \
45 $(top_srcdir)/m4/inttypes-pri.m4 \
46 $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \
47 $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
48 $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libnih.m4 \
49 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/lock.m4 \
50 $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \
51 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
52 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
53 $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \
54 $(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \
55 $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \
56 $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \
57 $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/m4/wchar_t.m4 \
58 $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \
59 $(top_srcdir)/configure.ac
60am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
61 $(ACLOCAL_M4)
62mkinstalldirs = $(install_sh) -d
63CONFIG_HEADER = $(top_builddir)/config.h
64CONFIG_CLEAN_FILES =
65CONFIG_CLEAN_VPATH_FILES =
66AM_V_GEN = $(am__v_GEN_$(V))
67am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
68am__v_GEN_0 = @echo " GEN " $@;
69AM_V_at = $(am__v_at_$(V))
70am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
71am__v_at_0 = @
72SOURCES =
73DIST_SOURCES =
74am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
75am__vpath_adj = case $$p in \
76 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
77 *) f=$$p;; \
78 esac;
79am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
80am__install_max = 40
81am__nobase_strip_setup = \
82 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
83am__nobase_strip = \
84 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
85am__nobase_list = $(am__nobase_strip_setup); \
86 for p in $$list; do echo "$$p $$p"; done | \
87 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
88 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
89 if (++n[$$2] == $(am__install_max)) \
90 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
91 END { for (dir in files) print dir, files[dir] }'
92am__base_list = \
93 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
94 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
95am__installdirs = "$(DESTDIR)$(upstart_jobs_initramfs_configdir)"
96DATA = $(upstart_jobs_initramfs_config_DATA)
97DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
98ACLOCAL = @ACLOCAL@
99ALLOCA = @ALLOCA@
100AMTAR = @AMTAR@
101AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
102AR = @AR@
103AUTOCONF = @AUTOCONF@
104AUTOHEADER = @AUTOHEADER@
105AUTOMAKE = @AUTOMAKE@
106AWK = @AWK@
107BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
108CATOBJEXT = @CATOBJEXT@
109CC = @CC@
110CCDEPMODE = @CCDEPMODE@
111CFLAGS = @CFLAGS@
112CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
113CPP = @CPP@
114CPPFLAGS = @CPPFLAGS@
115CYGPATH_W = @CYGPATH_W@
116DATADIRNAME = @DATADIRNAME@
117DBUS_CFLAGS = @DBUS_CFLAGS@
118DBUS_LIBS = @DBUS_LIBS@
119DEFS = @DEFS@
120DEPDIR = @DEPDIR@
121DSYMUTIL = @DSYMUTIL@
122DUMPBIN = @DUMPBIN@
123ECHO_C = @ECHO_C@
124ECHO_N = @ECHO_N@
125ECHO_T = @ECHO_T@
126EGREP = @EGREP@
127EXEEXT = @EXEEXT@
128FGREP = @FGREP@
129GENCAT = @GENCAT@
130GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
131GLIBC2 = @GLIBC2@
132GLIBC21 = @GLIBC21@
133GMSGFMT = @GMSGFMT@
134GMSGFMT_015 = @GMSGFMT_015@
135GREP = @GREP@
136HAVE_ASPRINTF = @HAVE_ASPRINTF@
137HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
138HAVE_SNPRINTF = @HAVE_SNPRINTF@
139HAVE_VISIBILITY = @HAVE_VISIBILITY@
140HAVE_WPRINTF = @HAVE_WPRINTF@
141INSTALL = @INSTALL@
142INSTALL_DATA = @INSTALL_DATA@
143INSTALL_PROGRAM = @INSTALL_PROGRAM@
144INSTALL_SCRIPT = @INSTALL_SCRIPT@
145INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
146INSTOBJEXT = @INSTOBJEXT@
147INTLBISON = @INTLBISON@
148INTLLIBS = @INTLLIBS@
149INTLOBJS = @INTLOBJS@
150INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
151INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
152LD = @LD@
153LDFLAGS = @LDFLAGS@
154LIBICONV = @LIBICONV@
155LIBINTL = @LIBINTL@
156LIBMULTITHREAD = @LIBMULTITHREAD@
157LIBOBJS = @LIBOBJS@
158LIBPTH = @LIBPTH@
159LIBPTH_PREFIX = @LIBPTH_PREFIX@
160LIBS = @LIBS@
161LIBTHREAD = @LIBTHREAD@
162LIBTOOL = @LIBTOOL@
163LIPO = @LIPO@
164LN_S = @LN_S@
165LTLIBC = @LTLIBC@
166LTLIBICONV = @LTLIBICONV@
167LTLIBINTL = @LTLIBINTL@
168LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
169LTLIBOBJS = @LTLIBOBJS@
170LTLIBPTH = @LTLIBPTH@
171LTLIBTHREAD = @LTLIBTHREAD@
172MAINT = @MAINT@
173MAKEINFO = @MAKEINFO@
174MKDIR_P = @MKDIR_P@
175MSGFMT = @MSGFMT@
176MSGFMT_015 = @MSGFMT_015@
177MSGMERGE = @MSGMERGE@
178NIH_CFLAGS = @NIH_CFLAGS@
179NIH_DBUS_CFLAGS = @NIH_DBUS_CFLAGS@
180NIH_DBUS_LIBS = @NIH_DBUS_LIBS@
181NIH_DBUS_TOOL = @NIH_DBUS_TOOL@
182NIH_LIBS = @NIH_LIBS@
183NM = @NM@
184NMEDIT = @NMEDIT@
185OBJDUMP = @OBJDUMP@
186OBJEXT = @OBJEXT@
187OTOOL = @OTOOL@
188OTOOL64 = @OTOOL64@
189PACKAGE = @PACKAGE@
190PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
191PACKAGE_NAME = @PACKAGE_NAME@
192PACKAGE_STRING = @PACKAGE_STRING@
193PACKAGE_TARNAME = @PACKAGE_TARNAME@
194PACKAGE_URL = @PACKAGE_URL@
195PACKAGE_VERSION = @PACKAGE_VERSION@
196PATH_SEPARATOR = @PATH_SEPARATOR@
197PKG_CONFIG = @PKG_CONFIG@
198PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
199PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
200PLYMOUTH_CFLAGS = @PLYMOUTH_CFLAGS@
201PLYMOUTH_LIBS = @PLYMOUTH_LIBS@
202POSUB = @POSUB@
203PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
204RANLIB = @RANLIB@
205SED = @SED@
206SET_MAKE = @SET_MAKE@
207SHELL = @SHELL@
208STRIP = @STRIP@
209UDEV_CFLAGS = @UDEV_CFLAGS@
210UDEV_LIBS = @UDEV_LIBS@
211USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
212USE_NLS = @USE_NLS@
213VERSION = @VERSION@
214WINDRES = @WINDRES@
215WOE32 = @WOE32@
216WOE32DLL = @WOE32DLL@
217XGETTEXT = @XGETTEXT@
218XGETTEXT_015 = @XGETTEXT_015@
219XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
220abs_builddir = @abs_builddir@
221abs_srcdir = @abs_srcdir@
222abs_top_builddir = @abs_top_builddir@
223abs_top_srcdir = @abs_top_srcdir@
224ac_ct_CC = @ac_ct_CC@
225ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
226am__include = @am__include@
227am__leading_dot = @am__leading_dot@
228am__quote = @am__quote@
229am__tar = @am__tar@
230am__untar = @am__untar@
231bindir = @bindir@
232build = @build@
233build_alias = @build_alias@
234build_cpu = @build_cpu@
235build_os = @build_os@
236build_vendor = @build_vendor@
237builddir = @builddir@
238datadir = @datadir@
239datarootdir = @datarootdir@
240docdir = @docdir@
241dvidir = @dvidir@
242exec_prefix = @exec_prefix@
243host = @host@
244host_alias = @host_alias@
245host_cpu = @host_cpu@
246host_os = @host_os@
247host_vendor = @host_vendor@
248htmldir = @htmldir@
249includedir = @includedir@
250infodir = @infodir@
251install_sh = @install_sh@
252libdir = @libdir@
253libexecdir = @libexecdir@
254localedir = @localedir@
255localstatedir = @localstatedir@
256lt_ECHO = @lt_ECHO@
257mandir = @mandir@
258mkdir_p = @mkdir_p@
259oldincludedir = @oldincludedir@
260pdfdir = @pdfdir@
261prefix = @prefix@
262program_transform_name = @program_transform_name@
263psdir = @psdir@
264sbindir = @sbindir@
265sharedstatedir = @sharedstatedir@
266srcdir = @srcdir@
267sysconfdir = @sysconfdir@
268target_alias = @target_alias@
269top_build_prefix = @top_build_prefix@
270top_builddir = @top_builddir@
271top_srcdir = @top_srcdir@
272upstart_jobs_initramfs_configdir = /usr/share/initramfs-tools/event-driven/upstart-jobs/
273upstart_jobs_initramfs_config_DATA = mountall.conf
274all: all-am
275
276.SUFFIXES:
277$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
278 @for dep in $?; do \
279 case '$(am__configure_deps)' in \
280 *$$dep*) \
281 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
282 && { if test -f $@; then exit 0; else break; fi; }; \
283 exit 1;; \
284 esac; \
285 done; \
286 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign debian/initramfs/upstart-jobs/Makefile'; \
287 $(am__cd) $(top_srcdir) && \
288 $(AUTOMAKE) --foreign debian/initramfs/upstart-jobs/Makefile
289.PRECIOUS: Makefile
290Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
291 @case '$?' in \
292 *config.status*) \
293 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
294 *) \
295 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
296 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
297 esac;
298
299$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
300 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
301
302$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
303 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
304$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
305 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
306$(am__aclocal_m4_deps):
307
308mostlyclean-libtool:
309 -rm -f *.lo
310
311clean-libtool:
312 -rm -rf .libs _libs
313install-upstart_jobs_initramfs_configDATA: $(upstart_jobs_initramfs_config_DATA)
314 @$(NORMAL_INSTALL)
315 test -z "$(upstart_jobs_initramfs_configdir)" || $(MKDIR_P) "$(DESTDIR)$(upstart_jobs_initramfs_configdir)"
316 @list='$(upstart_jobs_initramfs_config_DATA)'; test -n "$(upstart_jobs_initramfs_configdir)" || list=; \
317 for p in $$list; do \
318 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
319 echo "$$d$$p"; \
320 done | $(am__base_list) | \
321 while read files; do \
322 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(upstart_jobs_initramfs_configdir)'"; \
323 $(INSTALL_DATA) $$files "$(DESTDIR)$(upstart_jobs_initramfs_configdir)" || exit $$?; \
324 done
325
326uninstall-upstart_jobs_initramfs_configDATA:
327 @$(NORMAL_UNINSTALL)
328 @list='$(upstart_jobs_initramfs_config_DATA)'; test -n "$(upstart_jobs_initramfs_configdir)" || list=; \
329 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
330 test -n "$$files" || exit 0; \
331 echo " ( cd '$(DESTDIR)$(upstart_jobs_initramfs_configdir)' && rm -f" $$files ")"; \
332 cd "$(DESTDIR)$(upstart_jobs_initramfs_configdir)" && rm -f $$files
333tags: TAGS
334TAGS:
335
336ctags: CTAGS
337CTAGS:
338
339
340distdir: $(DISTFILES)
341 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
342 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
343 list='$(DISTFILES)'; \
344 dist_files=`for file in $$list; do echo $$file; done | \
345 sed -e "s|^$$srcdirstrip/||;t" \
346 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
347 case $$dist_files in \
348 */*) $(MKDIR_P) `echo "$$dist_files" | \
349 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
350 sort -u` ;; \
351 esac; \
352 for file in $$dist_files; do \
353 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
354 if test -d $$d/$$file; then \
355 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
356 if test -d "$(distdir)/$$file"; then \
357 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
358 fi; \
359 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
360 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
361 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
362 fi; \
363 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
364 else \
365 test -f "$(distdir)/$$file" \
366 || cp -p $$d/$$file "$(distdir)/$$file" \
367 || exit 1; \
368 fi; \
369 done
370check-am: all-am
371check: check-am
372all-am: Makefile $(DATA)
373installdirs:
374 for dir in "$(DESTDIR)$(upstart_jobs_initramfs_configdir)"; do \
375 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
376 done
377install: install-am
378install-exec: install-exec-am
379install-data: install-data-am
380uninstall: uninstall-am
381
382install-am: all-am
383 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
384
385installcheck: installcheck-am
386install-strip:
387 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
388 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
389 `test -z '$(STRIP)' || \
390 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
391mostlyclean-generic:
392
393clean-generic:
394
395distclean-generic:
396 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
397 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
398
399maintainer-clean-generic:
400 @echo "This command is intended for maintainers to use"
401 @echo "it deletes files that may require special tools to rebuild."
402clean: clean-am
403
404clean-am: clean-generic clean-libtool mostlyclean-am
405
406distclean: distclean-am
407 -rm -f Makefile
408distclean-am: clean-am distclean-generic
409
410dvi: dvi-am
411
412dvi-am:
413
414html: html-am
415
416html-am:
417
418info: info-am
419
420info-am:
421
422install-data-am: install-upstart_jobs_initramfs_configDATA
423
424install-dvi: install-dvi-am
425
426install-dvi-am:
427
428install-exec-am:
429
430install-html: install-html-am
431
432install-html-am:
433
434install-info: install-info-am
435
436install-info-am:
437
438install-man:
439
440install-pdf: install-pdf-am
441
442install-pdf-am:
443
444install-ps: install-ps-am
445
446install-ps-am:
447
448installcheck-am:
449
450maintainer-clean: maintainer-clean-am
451 -rm -f Makefile
452maintainer-clean-am: distclean-am maintainer-clean-generic
453
454mostlyclean: mostlyclean-am
455
456mostlyclean-am: mostlyclean-generic mostlyclean-libtool
457
458pdf: pdf-am
459
460pdf-am:
461
462ps: ps-am
463
464ps-am:
465
466uninstall-am: uninstall-upstart_jobs_initramfs_configDATA
467
468.MAKE: install-am install-strip
469
470.PHONY: all all-am check check-am clean clean-generic clean-libtool \
471 distclean distclean-generic distclean-libtool distdir dvi \
472 dvi-am html html-am info info-am install install-am \
473 install-data install-data-am install-dvi install-dvi-am \
474 install-exec install-exec-am install-html install-html-am \
475 install-info install-info-am install-man install-pdf \
476 install-pdf-am install-ps install-ps-am install-strip \
477 install-upstart_jobs_initramfs_configDATA installcheck \
478 installcheck-am installdirs maintainer-clean \
479 maintainer-clean-generic mostlyclean mostlyclean-generic \
480 mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
481 uninstall-upstart_jobs_initramfs_configDATA
482
483
484# Tell versions [3.59,3.63) of GNU make to not export all variables.
485# Otherwise a system limit (for SysV at least) may be exceeded.
486.NOEXPORT:
0487
=== added file 'debian/initramfs/upstart-jobs/mountall.conf'
--- debian/initramfs/upstart-jobs/mountall.conf 1970-01-01 00:00:00 +0000
+++ debian/initramfs/upstart-jobs/mountall.conf 2011-07-15 11:51:33 +0000
@@ -0,0 +1,27 @@
1# mountall - Mount filesystems on boot
2#
3# This helper mounts filesystems in the correct order as the devices
4# and mountpoints become available.
5
6description "Mount filesystems on boot"
7
8start on stopping boot-premount
9stop on filesystem
10
11expect daemon
12task
13
14emits virtual-filesystems
15emits local-filesystems
16emits remote-filesystems
17emits all-swaps
18emits filesystem
19emits mounting
20emits mounted
21emits device-not-ready
22
23# temporary, until we have progress indication
24# and output capture (next week :p)
25console output
26
27exec mountall --daemon
028
=== modified file 'src/Makefile.am'
--- src/Makefile.am 2010-03-12 18:22:45 +0000
+++ src/Makefile.am 2011-07-15 11:51:33 +0000
@@ -21,9 +21,13 @@
21 mountall21 mountall
2222
23mountall_SOURCES = \23mountall_SOURCES = \
24 mountall.c24 control.c control.h mountall.c
25
25nodist_mountall_SOURCES = \26nodist_mountall_SOURCES = \
26 $(com_ubuntu_Upstart_OUTPUTS)27 $(com_ubuntu_Upstart_OUTPUTS) \
28 $(com_ubuntu_Mountall_Server_OUTPUTS)
29
30
27mountall_LDADD = \31mountall_LDADD = \
28 $(NIH_LIBS) \32 $(NIH_LIBS) \
29 $(NIH_DBUS_LIBS) \33 $(NIH_DBUS_LIBS) \
@@ -32,7 +36,6 @@
32 $(PLYMOUTH_LIBS) \36 $(PLYMOUTH_LIBS) \
33 $(LTLIBINTL)37 $(LTLIBINTL)
3438
35
36com_ubuntu_Upstart_OUTPUTS = \39com_ubuntu_Upstart_OUTPUTS = \
37 com.ubuntu.Upstart.c \40 com.ubuntu.Upstart.c \
38 com.ubuntu.Upstart.h41 com.ubuntu.Upstart.h
@@ -42,19 +45,35 @@
4245
43$(com_ubuntu_Upstart_OUTPUTS): $(com_ubuntu_Upstart_XML)46$(com_ubuntu_Upstart_OUTPUTS): $(com_ubuntu_Upstart_XML)
44 $(NIH_DBUS_TOOL) \47 $(NIH_DBUS_TOOL) \
45 --package=$(PACAKGE) \48 --package=$(PACKAGE) \
46 --mode=proxy --prefix=upstart \49 --mode=proxy --prefix=upstart \
47 --default-interface=com.ubuntu.Upstart0_6 \50 --default-interface=com.ubuntu.Upstart0_6 \
48 --output=$@ $<51 --output=$@ $<
4952
53com_ubuntu_Mountall_Server_OUTPUTS = \
54 com.ubuntu.Mountall.Server.c \
55 com.ubuntu.Mountall.Server.h
56
57com_ubuntu_Mountall_Server_XML = \
58 ../dbus/com.ubuntu.Mountall.Server.xml
59
60$(com_ubuntu_Mountall_Server_OUTPUTS): $(com_ubuntu_Mountall_Server_XML)
61 $(NIH_DBUS_TOOL) \
62 --package=$(PACKAGE) \
63 --mode=object --prefix=control \
64 --default-interface=com.ubuntu.Mountall0_1.Server \
65 --output=$@ $<
66
5067
51# These have to be built sources because we can't compile object files68# These have to be built sources because we can't compile object files
52# without the header file existing first69# without the header file existing first
53BUILT_SOURCES = \70BUILT_SOURCES = \
54 $(com_ubuntu_Upstart_OUTPUTS)71 $(com_ubuntu_Upstart_OUTPUTS) \
72 $(com_ubuntu_Mountall_Server_OUTPUTS)
5573
56CLEANFILES = \74CLEANFILES = \
57 $(com_ubuntu_Upstart_OUTPUTS)75 $(com_ubuntu_Upstart_OUTPUTS) \
76 $(com_ubuntu_Mountall_Server_OUTPUTS)
5877
5978
60clean-local:79clean-local:
6180
=== modified file 'src/Makefile.in'
--- src/Makefile.in 2011-03-01 21:34:04 +0000
+++ src/Makefile.in 2011-07-15 11:51:33 +0000
@@ -68,9 +68,10 @@
68CONFIG_CLEAN_VPATH_FILES =68CONFIG_CLEAN_VPATH_FILES =
69am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(initdir)"69am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(initdir)"
70PROGRAMS = $(sbin_PROGRAMS)70PROGRAMS = $(sbin_PROGRAMS)
71am_mountall_OBJECTS = mountall.$(OBJEXT)71am_mountall_OBJECTS = control.$(OBJEXT) mountall.$(OBJEXT)
72am__objects_1 = com.ubuntu.Upstart.$(OBJEXT)72am__objects_1 = com.ubuntu.Upstart.$(OBJEXT)
73nodist_mountall_OBJECTS = $(am__objects_1)73am__objects_2 = com.ubuntu.Mountall.Server.$(OBJEXT)
74nodist_mountall_OBJECTS = $(am__objects_1) $(am__objects_2)
74mountall_OBJECTS = $(am_mountall_OBJECTS) $(nodist_mountall_OBJECTS)75mountall_OBJECTS = $(am_mountall_OBJECTS) $(nodist_mountall_OBJECTS)
75am__DEPENDENCIES_1 =76am__DEPENDENCIES_1 =
76mountall_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \77mountall_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
@@ -321,10 +322,11 @@
321initdir = $(libdir)/init322initdir = $(libdir)/init
322dist_init_DATA = fstab323dist_init_DATA = fstab
323mountall_SOURCES = \324mountall_SOURCES = \
324 mountall.c325 control.c control.h mountall.c
325326
326nodist_mountall_SOURCES = \327nodist_mountall_SOURCES = \
327 $(com_ubuntu_Upstart_OUTPUTS)328 $(com_ubuntu_Upstart_OUTPUTS) \
329 $(com_ubuntu_Mountall_Server_OUTPUTS)
328330
329mountall_LDADD = \331mountall_LDADD = \
330 $(NIH_LIBS) \332 $(NIH_LIBS) \
@@ -341,14 +343,23 @@
341com_ubuntu_Upstart_XML = \343com_ubuntu_Upstart_XML = \
342 ../dbus/com.ubuntu.Upstart.xml344 ../dbus/com.ubuntu.Upstart.xml
343345
346com_ubuntu_Mountall_Server_OUTPUTS = \
347 com.ubuntu.Mountall.Server.c \
348 com.ubuntu.Mountall.Server.h
349
350com_ubuntu_Mountall_Server_XML = \
351 ../dbus/com.ubuntu.Mountall.Server.xml
352
344353
345# These have to be built sources because we can't compile object files354# These have to be built sources because we can't compile object files
346# without the header file existing first355# without the header file existing first
347BUILT_SOURCES = \356BUILT_SOURCES = \
348 $(com_ubuntu_Upstart_OUTPUTS)357 $(com_ubuntu_Upstart_OUTPUTS) \
358 $(com_ubuntu_Mountall_Server_OUTPUTS)
349359
350CLEANFILES = \360CLEANFILES = \
351 $(com_ubuntu_Upstart_OUTPUTS)361 $(com_ubuntu_Upstart_OUTPUTS) \
362 $(com_ubuntu_Mountall_Server_OUTPUTS)
352363
353all: $(BUILT_SOURCES)364all: $(BUILT_SOURCES)
354 $(MAKE) $(AM_MAKEFLAGS) all-am365 $(MAKE) $(AM_MAKEFLAGS) all-am
@@ -438,7 +449,9 @@
438distclean-compile:449distclean-compile:
439 -rm -f *.tab.c450 -rm -f *.tab.c
440451
452@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com.ubuntu.Mountall.Server.Po@am__quote@
441@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com.ubuntu.Upstart.Po@am__quote@453@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com.ubuntu.Upstart.Po@am__quote@
454@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/control.Po@am__quote@
442@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mountall.Po@am__quote@455@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mountall.Po@am__quote@
443456
444.c.o:457.c.o:
@@ -701,11 +714,18 @@
701714
702$(com_ubuntu_Upstart_OUTPUTS): $(com_ubuntu_Upstart_XML)715$(com_ubuntu_Upstart_OUTPUTS): $(com_ubuntu_Upstart_XML)
703 $(NIH_DBUS_TOOL) \716 $(NIH_DBUS_TOOL) \
704 --package=$(PACAKGE) \717 --package=$(PACKAGE) \
705 --mode=proxy --prefix=upstart \718 --mode=proxy --prefix=upstart \
706 --default-interface=com.ubuntu.Upstart0_6 \719 --default-interface=com.ubuntu.Upstart0_6 \
707 --output=$@ $<720 --output=$@ $<
708721
722$(com_ubuntu_Mountall_Server_OUTPUTS): $(com_ubuntu_Mountall_Server_XML)
723 $(NIH_DBUS_TOOL) \
724 --package=$(PACKAGE) \
725 --mode=object --prefix=control \
726 --default-interface=com.ubuntu.Mountall0_1.Server \
727 --output=$@ $<
728
709clean-local:729clean-local:
710 rm -f *.gcno *.gcda730 rm -f *.gcno *.gcda
711731
712732
=== added file 'src/control.c'
--- src/control.c 1970-01-01 00:00:00 +0000
+++ src/control.c 2011-07-15 11:51:33 +0000
@@ -0,0 +1,258 @@
1/* mountall
2 *
3 * Copyright © 2010 Canonical Ltd.
4 * Author: Surbhi A. Palande <surbhi.palande@ubuntu.com>
5 *
6 * This file is based on control.c in upstart whose
7 * Author: Scott James Remnant <scott@netsplit.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2, as
11 * published by the Free Software Foundation.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 */
22
23#include <dbus/dbus.h>
24
25#include <nih/macros.h>
26#include <nih/alloc.h>
27#include <nih/string.h>
28#include <nih/list.h>
29#include <nih/io.h>
30#include <nih/main.h>
31#include <nih/logging.h>
32#include <nih/error.h>
33#include <nih/errors.h>
34
35#include <nih-dbus/dbus_error.h>
36#include <nih-dbus/dbus_connection.h>
37#include <nih-dbus/dbus_message.h>
38#include <nih-dbus/dbus_object.h>
39
40#include "dbus/mountall.h"
41#include "com.ubuntu.Mountall.Server.h"
42#include "mountall.h"
43
44extern const char *package_string;
45
46/* Prototypes for static functions */
47static int control_server_connect (DBusServer *server, DBusConnection *conn);
48static void control_disconnected (DBusConnection *conn);
49static void control_register_all (DBusConnection *conn);
50
51/**
52 * control_server
53 *
54 * D-Bus server listening for new direct connections.
55 **/
56DBusServer *control_server = NULL;
57
58
59/**
60 * control_server_address:
61 *
62 * Address on which the control server may be reached.
63 **/
64const char * control_server_address = DBUS_ADDRESS_MNTALL;
65
66/**
67 * control_server_open:
68 *
69 * Open a listening D-Bus server and store it in the control_server global.
70 * New connections are permitted from the root user, and handled
71 * automatically in the main loop.
72 *
73 * Returns: zero on success, negative value on raised error.
74 **/
75
76int
77control_server_open (void)
78{
79 nih_assert (control_server == NULL);
80
81 control_server = nih_dbus_server (control_server_address,
82 control_server_connect,
83 control_disconnected);
84 if (! control_server)
85 return -1;
86
87 nih_debug("Mountall0_1.Server started at address: %s", control_server_address);
88
89 return 0;
90}
91
92/**
93 * control_server_connect:
94 *
95 * Called when a new client connects to our server and is used to register
96 * objects on the new connection.
97 *
98 * Returns: always TRUE.
99 **/
100static int
101control_server_connect (DBusServer *server,
102 DBusConnection *conn)
103{
104 nih_assert (server != NULL);
105 nih_assert (server == control_server);
106 nih_assert (conn != NULL);
107
108 /* Register objects on the connection. */
109 control_register_all (conn);
110
111 nih_debug("Mountall0_1.Server::Connection from private client");
112
113 return TRUE;
114}
115
116/**
117 * control_register_all:
118 * @conn: connection to register objects for.
119 *
120 * Registers the manager object and objects for all jobs and instances on
121 * the given connection.
122 **/
123static void
124control_register_all (DBusConnection *conn)
125{
126 nih_assert (conn != NULL);
127
128 /* Register the manager object, this is the primary point of contact
129 * for clients. We only check for success, otherwise we're happy
130 * to let this object be tied to the lifetime of the connection.
131 */
132 NIH_MUST (nih_dbus_object_new (NULL, conn, DBUS_PATH_MNTALL,
133 control_interfaces, NULL));
134}
135
136/**
137 * control_disconnected:
138 *
139 * This function is called when the connection to the D-Bus system bus,
140 * or a client connection to our D-Bus server, is dropped and our reference
141 * is about to be list. We clear the connection from our current list
142 * and drop the control_bus global if relevant.
143 **/
144static void
145control_disconnected (DBusConnection *conn)
146{
147 nih_assert (conn != NULL);
148}
149
150/**
151 * control_stop_timer:
152 * @mountpoint: the mountpoint corresponding to the device for which the
153 * timeout option has to be disabled.
154 *
155 * Implements the StopTimer method of com.ubuntu.Moutall01_Server
156 * interface.
157 *
158 * This function is called for stopping a previously started timer for a
159 * mountpoint. Stopping a timer has the effect that mountall would no longer
160 * expect the corresponding device to be ready within a previously registered
161 * stiplulated time period. After this call, mountall will wait endlessly till
162 * the device becomes ready. Use this function only when you know that you
163 * might restart the timer later or that you really want to wait endlessly
164 * till the device becomes available.
165 *
166 * Returns 0 on success and -1 on failure.
167 **/
168int
169control_stop_timer (void *data,
170 NihDBusMessage *message,
171 const char *mountpoint)
172{
173
174 nih_assert (mountpoint != NULL);
175 nih_assert (message != NULL);
176
177 return stop_dev_timer (mountpoint);
178}
179
180/**
181 * control_restart_timer:
182 * @mountpoint: the mountpoint corresponding to the device for which the
183 * timeout option has to be disabled.
184 *
185 * Implements the RestartTimer method of com.ubuntu.Moutall01_Server
186 * interface.
187 *
188 * This function is called for restarting a previously stopped timer for a
189 * mountpoint. After successfully restarting a timer, mountall will expect the
190 * corresponding device to become ready for mounting within the previously
191 * configured timeout or the default of 30 seconds.
192 *
193 * Returns 0 on success and -1 on failure.
194 **/
195int
196control_restart_timer (void *data,
197 NihDBusMessage *message,
198 const char *mountpoint)
199{
200
201 nih_assert (mountpoint != NULL);
202 nih_assert (message != NULL);
203
204 return restart_dev_timer (mountpoint);
205}
206
207/**
208 * control_change_mount_device:
209 * @devname: Name of the new device which you want to mount at @path.
210 * @path: Complete path which matches with the one found in /etc/fstab or what
211 * mountall already considers.
212 *
213 * Implements the ChangeMountDevice method of com.ubuntu.Moutall01_Server
214 * interface.
215 *
216 * Call this function to change the device to mount to an existing previous
217 * mountpoint.
218 **/
219int
220control_change_mount_device (void *data,
221 NihDBusMessage *message,
222 const char *devname,
223 const char *path)
224{
225 nih_assert (devname != NULL);
226 nih_assert (path != NULL);
227
228 return change_mount_device (devname, path);
229}
230
231/**
232 * control_get_version:
233 * @data: not used,
234 * @message: D-Bus connection and message received,
235 * @version: pointer for reply string.
236 *
237 * Implements the get method for the version property of the
238 * com.ubuntu.Mountall0_1.Server interface.
239 *
240 * Called to obtain the version of the init daemon, which will be stored
241 * as a string in @version.
242 *
243 * Returns: zero on success, negative value on raised error.
244 **/
245int
246control_get_version (void *data,
247 NihDBusMessage *message,
248 char **version)
249{
250 nih_assert (message != NULL);
251 nih_assert (version != NULL);
252
253 *version = nih_strdup (message, package_string);
254 if (!*version)
255 nih_return_no_memory_error (-1);
256
257 return 0;
258}
0259
=== added file 'src/control.h'
--- src/control.h 1970-01-01 00:00:00 +0000
+++ src/control.h 2011-07-15 11:51:33 +0000
@@ -0,0 +1,36 @@
1/* mountall
2 *
3 * Copyright © 2010 Canonical Ltd.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2, as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18
19#include "dbus/mountall.h"
20
21extern DBusServer *control_server;
22extern const NihDBusInterface *control_interfaces[];
23
24int control_server_open (void);
25int control_stop_timer (void *data, NihDBusMessage *message,
26 const char *mountpoint)
27 __attribute__ ((warn_unused_result));
28int control_restart_timer (void *data, NihDBusMessage *message,
29 const char *mountpoint)
30 __attribute__ ((warn_unused_result));
31int control_change_mount_device (void *data, NihDBusMessage *message,
32 const char *devname, const char *path)
33 __attribute__ ((warn_unused_result));
34int control_get_version (void *data, NihDBusMessage *message,
35 char **value)
36 __attribute__ ((warn_unused_result));
037
=== modified file 'src/mountall.c'
--- src/mountall.c 2011-04-13 12:59:22 +0000
+++ src/mountall.c 2011-07-15 11:51:33 +0000
@@ -71,6 +71,7 @@
7171
72#include "dbus/upstart.h"72#include "dbus/upstart.h"
73#include "com.ubuntu.Upstart.h"73#include "com.ubuntu.Upstart.h"
74#include "control.h"
7475
7576
76#define BUILTIN_FSTAB "/lib/init/fstab"77#define BUILTIN_FSTAB "/lib/init/fstab"
@@ -1342,7 +1343,7 @@
13421343
1343 /* TAG_TIMEOUT is TAG_LOCAL with a timeout. timeout cannot be1344 /* TAG_TIMEOUT is TAG_LOCAL with a timeout. timeout cannot be
1344 * inherited but local could be */1345 * inherited but local could be */
1345 if(tag == TAG_TIMEOUT)1346 if (tag == TAG_TIMEOUT)
1346 tag = TAG_LOCAL;1347 tag = TAG_LOCAL;
13471348
1348 if ((tag == TAG_LOCAL)1349 if ((tag == TAG_LOCAL)
@@ -1448,7 +1449,7 @@
1448 num_local_mounted++;1449 num_local_mounted++;
1449 num_timeout_mounted++;1450 num_timeout_mounted++;
1450 if (num_timeout_mounted == num_timeout) {1451 if (num_timeout_mounted == num_timeout) {
1451 nih_message(_("\n %s finished! "), "local_timeout");1452 nih_message (_("\n %s finished! "), "local_timeout");
1452 /* Stop the timeout waiting for device to get ready"1453 /* Stop the timeout waiting for device to get ready"
1453 */1454 */
1454 if (device_ready_timer) {1455 if (device_ready_timer) {
@@ -1596,9 +1597,22 @@
1596 num_swap_mounted, num_swap);1597 num_swap_mounted, num_swap);
1597}1598}
15981599
15991600/*
1601 * is_device_ready:
1602 *
1603 * @data: Not used
1604 * @timer: timer which was preconfigured and on the expiry of which this
1605 * function is called.
1606 *
1607 * This function is called to check if any device marked with the "timeout"
1608 * option in the /etc/fstab is not ready when the preconfigured @timer
1609 * expires.
1610 * It emits a "device-not-ready" event when it finds that such a device is not
1611 * yet ready.
1612 */
1600void1613void
1601is_device_ready(void * data, NihTimer *timer)1614is_device_ready (void * data,
1615 NihTimer *timer)
1602{1616{
1603 device_ready_timer = NULL;1617 device_ready_timer = NULL;
1604 NIH_LIST_FOREACH (mounts, iter) {1618 NIH_LIST_FOREACH (mounts, iter) {
@@ -1617,17 +1631,20 @@
1617 || (! strncmp (mnt->device, "UUID=", 5))1631 || (! strncmp (mnt->device, "UUID=", 5))
1618 || (! strncmp (mnt->device, "LABEL=", 6))))1632 || (! strncmp (mnt->device, "LABEL=", 6))))
1619 {1633 {
1620 nih_message("%s device not ready in ROOTDELAY sec", MOUNT_NAME (mnt));1634 nih_message ("%s device not ready in ROOTDELAY sec", MOUNT_NAME (mnt));
1621 emit_event("device-not-ready", mnt);1635 emit_event ("device-not-ready", mnt);
1622 break;
1623
1624 }1636 }
1625
1626 }1637 }
1627
1628}1638}
16291639
1630void activate_timer()1640/*
1641 * activate_timer:
1642 *
1643 * This function is called to start a timer when the first device with
1644 * "timeout" option is found.
1645 */
1646void
1647activate_timer (void)
1631{1648{
1632 NIH_LIST_FOREACH (mounts, iter) {1649 NIH_LIST_FOREACH (mounts, iter) {
1633 Mount *mnt = (Mount *)iter;1650 Mount *mnt = (Mount *)iter;
@@ -1647,9 +1664,9 @@
1647 || (! strncmp (mnt->device, "UUID=", 5))1664 || (! strncmp (mnt->device, "UUID=", 5))
1648 || (! strncmp (mnt->device, "LABEL=", 6))))1665 || (! strncmp (mnt->device, "LABEL=", 6))))
1649 {1666 {
1650 if(!dev_wait_time)1667 if (!dev_wait_time)
1651 dev_wait_time = ROOTDELAY;1668 dev_wait_time = ROOTDELAY;
1652 nih_message(_("Shall wait for device: %s for %d seconds, starting timer"), MOUNT_NAME (mnt), dev_wait_time);1669 nih_debug ("Shall wait for device: %s for %d seconds, starting timer", MOUNT_NAME (mnt), dev_wait_time);
1653 device_ready_timer = NIH_MUST (nih_timer_add_timeout (NULL, 1670 device_ready_timer = NIH_MUST (nih_timer_add_timeout (NULL,
1654 dev_wait_time, is_device_ready, NULL));1671 dev_wait_time, is_device_ready, NULL));
1655 break;1672 break;
@@ -1682,8 +1699,13 @@
1682 }1699 }
1683 }1700 }
16841701
1685 if (all)1702 if (all) {
1703 if (control_server) {
1704 dbus_server_disconnect (control_server);
1705 dbus_server_unref (control_server);
1706 }
1686 nih_main_loop_exit (EXIT_OK);1707 nih_main_loop_exit (EXIT_OK);
1708 }
1687 }1709 }
1688}1710}
16891711
@@ -1971,7 +1993,7 @@
1971 */1993 */
1972 if ((errno != EEXIST)1994 if ((errno != EEXIST)
1973 && has_option (mnt, "optional", FALSE)) {1995 && has_option (mnt, "optional", FALSE)) {
1974 nih_debug ("%s: mountpoint doesn't exist, ignoring",1996 nih_debug ("%s: mountpoint doesn't exist; ignoring",
1975 MOUNT_NAME (mnt));1997 MOUNT_NAME (mnt));
1976 mounted (mnt);1998 mounted (mnt);
1977 return;1999 return;
@@ -3158,37 +3180,37 @@
3158 /* Display that message */3180 /* Display that message */
3159 switch (plymouth_error) {3181 switch (plymouth_error) {
3160 case ERROR_BORED:3182 case ERROR_BORED:
3161 message = NIH_MUST (nih_sprintf (NULL,_("The disk drive for %s is not ready yet or not present"),3183 message = NIH_MUST (nih_sprintf (NULL,_("The disk drive for %s is not ready yet or not present."),
3162 MOUNT_NAME (plymouth_mnt)));3184 MOUNT_NAME (plymouth_mnt)));
3163 keys_message = NIH_MUST (nih_sprintf (NULL, "keys:%s",3185 keys_message = NIH_MUST (nih_sprintf (NULL, "keys:%s",
3164 _("Continue to wait; or Press S to skip mounting or M for manual recovery")));3186 _("Continue to wait, or Press S to skip mounting or M for manual recovery")));
3165 plymouth_keys = "SsMm";3187 plymouth_keys = "SsMm";
3166 break;3188 break;
3167 case ERROR_FSCK_FAILED:3189 case ERROR_FSCK_FAILED:
3168 message = NIH_MUST (nih_sprintf (NULL,_("Errors were found while checking the disk drive for %s"),3190 message = NIH_MUST (nih_sprintf (NULL,_("Errors were found while checking the disk drive for %s."),
3169 MOUNT_NAME (plymouth_mnt)));3191 MOUNT_NAME (plymouth_mnt)));
3170 keys_message = NIH_MUST (nih_sprintf (NULL, "keys:%s",3192 keys_message = NIH_MUST (nih_sprintf (NULL, "keys:%s",
3171 _("Press F to attempt to fix the errors, I to ignore, S to skip mounting or M for manual recovery")));3193 _("Press F to attempt to fix the errors, I to ignore, S to skip mounting, or M for manual recovery")));
3172 plymouth_keys = "FfIiSsMm";3194 plymouth_keys = "FfIiSsMm";
3173 break;3195 break;
3174 case ERROR_FSCK_FAILED_HARD:3196 case ERROR_FSCK_FAILED_HARD:
3175 message = NIH_MUST (nih_sprintf (NULL,_("Serious errors were found while checking the disk drive for %s"),3197 message = NIH_MUST (nih_sprintf (NULL,_("Serious errors were found while checking the disk drive for %s."),
3176 MOUNT_NAME (plymouth_mnt)));3198 MOUNT_NAME (plymouth_mnt)));
3177 keys_message = NIH_MUST (nih_sprintf (NULL, "keys:%s",3199 keys_message = NIH_MUST (nih_sprintf (NULL, "keys:%s",
3178 _("Press I to ignore, S to skip mounting or M for manual recovery")));3200 _("Press I to ignore, S to skip mounting, or M for manual recovery")));
3179 plymouth_keys = "IiSsMm";3201 plymouth_keys = "IiSsMm";
3180 break;3202 break;
3181 case ERROR_MOUNT_FAILED:3203 case ERROR_MOUNT_FAILED:
3182 message = NIH_MUST (nih_sprintf (NULL, _("An error occurred while mounting %s"),3204 message = NIH_MUST (nih_sprintf (NULL, _("An error occurred while mounting %s."),
3183 MOUNT_NAME (plymouth_mnt)));3205 MOUNT_NAME (plymouth_mnt)));
3184 keys_message = NIH_MUST (nih_sprintf (NULL, "keys:%s",3206 keys_message = NIH_MUST (nih_sprintf (NULL, "keys:%s",
3185 _("Press S to skip mounting or M for manual recovery")));3207 _("Press S to skip mounting or M for manual recovery")));
3186 plymouth_keys = "SsMm";3208 plymouth_keys = "SsMm";
3187 break;3209 break;
3188 case ERROR_FSCK_IN_PROGRESS:3210 case ERROR_FSCK_IN_PROGRESS:
3189 message = NIH_MUST (nih_strdup (NULL, _("Your disk drives are being checked for errors. This may take some time")));3211 message = NIH_MUST (nih_strdup (NULL, _("Checking disk drives are for errors. This may take several minutes.")));
3190 keys_message = NIH_MUST (nih_sprintf (NULL, "keys:%s",3212 keys_message = NIH_MUST (nih_sprintf (NULL, "keys:%s",
3191 _("Press C to cancel all checks currently in progress")));3213 _("Press C to cancel all checks in progress")));
3192 plymouth_keys = "Cc";3214 plymouth_keys = "Cc";
3193 break;3215 break;
3194 default:3216 default:
@@ -3334,21 +3356,35 @@
3334 }3356 }
3335}3357}
33363358
3337int set_dev_wait_time(NihOption *option, const char *arg)3359/*
3360 * set_dev_wait_time:
3361 *
3362 * @option: Not used
3363 * @arg: String receieved at the mountall command line by nih_option_parser
3364 * and passed to this function for parsing.
3365 *
3366 * This function is used to set the "dev_wait_time option" argument specified
3367 * at the mountall command line. It is called by the nih_option_parser for
3368 * parsing the argument string specified by @arg
3369 *
3370 */
3371int
3372set_dev_wait_time (NihOption *option,
3373 const char *arg)
3338{3374{
3339 char * end_ptr;3375 char * end_ptr;
3340 dev_wait_time = strtol(arg, &end_ptr, 10);3376 dev_wait_time = strtol (arg, &end_ptr, 10);
3341 int err = 0;3377 int err = 0;
3342 if(dev_wait_time <= 0) {3378 if (dev_wait_time <= 0) {
3343 nih_error(_("\n Legal values of dev-wait-time lie between 1sec to 2147483647 sec"));3379 nih_error (_("\n Legal values of dev-wait-time lie between 1sec to 2147483647 sec"));
3344 err = -1;3380 err = -1;
3345 }3381 }
3346 else if ((dev_wait_time == LONG_MIN) || (dev_wait_time == LONG_MAX)) {3382 else if ((dev_wait_time == LONG_MIN) || (dev_wait_time == LONG_MAX)) {
3347 nih_error(_("\n Legal values of dev-wait-time lie between 1sec to 2147483647 sec"));3383 nih_error (_("\n Legal values of dev-wait-time lie between 1sec to 2147483647 sec"));
3348 err = -1;3384 err = -1;
3349 }3385 }
3350 else if (*end_ptr != '\0') {3386 else if (*end_ptr != '\0') {
3351 nih_error(_("\n Legal values of dev-wait-time lie between 1sec to 2147483647 sec"));3387 nih_error (_("\n Legal values of dev-wait-time lie between 1sec to 2147483647 sec"));
3352 err = -1;3388 err = -1;
3353 }3389 }
3354 return err;3390 return err;
@@ -3356,6 +3392,195 @@
33563392
33573393
3358/**3394/**
3395 * stop_mountpoint_timer:
3396 * @mountpoint: mountpoint whose timer you want to stop.
3397 *
3398 * This function is called to stop a previously started timer of a device
3399 * Note that for this function to be successful, @mountpoint should be a
3400 * mountpoint corresponding to a device whose "timeout" option is set in the
3401 * /etc/fstab.
3402 *
3403 * Returns 0 on stopping the timer and -1 on not doing so.
3404 *
3405 **/
3406int
3407stop_dev_timer (const char *mountpoint)
3408{
3409 int ret = -1;
3410
3411 nih_assert (mountpoint != NULL);
3412
3413 if (strlen (mountpoint) == 0) {
3414 nih_message (_("Empty mountpoint specified"));
3415 return ret;
3416 }
3417
3418 NIH_LIST_FOREACH (mounts, iter) {
3419 Mount *mnt = (Mount *)iter;
3420
3421 if (mnt->mounted)
3422 continue;
3423 if (mnt->tag != TAG_TIMEOUT)
3424 continue;
3425
3426 if ((! mnt->ready)
3427 && (! mnt->nodev)
3428 && (! is_remote (mnt))
3429 && ((! strncmp (mnt->device, "/dev/", 5))
3430 || (! strncmp (mnt->device, "UUID=", 5))
3431 || (! strncmp (mnt->device, "LABEL=", 6)))
3432 && (! strcmp (mnt->mountpoint, mountpoint)))
3433 {
3434 if (device_ready_timer) {
3435 nih_debug ("Stopping the timer for the device:"
3436 "%s for %d seconds, starting timer",
3437 MOUNT_NAME (mnt), dev_wait_time);
3438 nih_free (device_ready_timer);
3439 device_ready_timer = NULL;
3440 ret = 0;
3441 }
3442 break;
3443
3444 }
3445 }
3446 return ret;
3447}
3448
3449/**
3450 * restart_dev_timer:
3451 ** @mountpoint: mountpoint whose timer you want to stop.
3452 *
3453 * This function is called to restart a previously stopped timer of a device
3454 * Note that for this function to be successful, @mountpoint should be a
3455 * mountpoint corresponding to a device whose "timeout" option is set in the
3456 * /etc/fstab.
3457 *
3458 * Returns 0 on restarting the timer and -1 on not doing so.
3459 *
3460 **/
3461int
3462restart_dev_timer (const char *mountpoint)
3463{
3464 int ret = -1;
3465
3466 nih_assert (mountpoint != NULL);
3467
3468 if (strlen (mountpoint) == 0) {
3469 nih_message (_("Empty mountpoint specified"));
3470 return ret;
3471 }
3472
3473 NIH_LIST_FOREACH (mounts, iter) {
3474 Mount *mnt = (Mount *)iter;
3475
3476 if (mnt->mounted)
3477 continue;
3478 if (mnt->tag != TAG_TIMEOUT)
3479 continue;
3480
3481 if ((! mnt->ready)
3482 && (! mnt->nodev)
3483 && (! is_remote (mnt))
3484 && ((! strncmp (mnt->device, "/dev/", 5))
3485 || (! strncmp (mnt->device, "UUID=", 5))
3486 || (! strncmp (mnt->device, "LABEL=", 6)))
3487 && (! strcmp (mnt->mountpoint, mountpoint)))
3488 {
3489
3490 if (!dev_wait_time)
3491 dev_wait_time = ROOTDELAY;
3492 if (!device_ready_timer) {
3493 nih_debug ("Shall wait for device: %s for %d "
3494 "seconds, starting timer",
3495 MOUNT_NAME (mnt), dev_wait_time);
3496 device_ready_timer = NIH_MUST (nih_timer_add_timeout (NULL,
3497 dev_wait_time, is_device_ready, NULL));
3498 ret = 0;
3499 }
3500 break;
3501
3502 }
3503 }
3504 return ret;
3505}
3506
3507/**
3508 * change_mount_device:
3509 * @devname: name of the new device.
3510 * @path: full path to a previously existing mountpoint.
3511 *
3512 * This function is called to change the device that would be mounted at a
3513 * given mountpoint without calling this function. Note that @path should be
3514 * what mountall has read from fstab or what mountall already knows for
3515 * mounting a device.
3516 *
3517 * Return 0 on successfully changing the device and -1 on not doing so.
3518 **/
3519int
3520change_mount_device (const char *devname,
3521 const char *path)
3522{
3523 int ret = -1;
3524
3525 nih_assert (devname != NULL);
3526 nih_assert (path != NULL);
3527
3528 if (strlen (devname) == 0) {
3529 nih_error(_("Empty device name specified"));
3530 return ret;
3531 }
3532 if (strlen (path) == 0) {
3533 nih_error (_("Empty mount point specified"));
3534 return ret;
3535 }
3536
3537 NIH_LIST_FOREACH (mounts, iter) {
3538 Mount *mnt = (Mount *)iter;
3539
3540 if (mnt->mounted)
3541 continue;
3542 if (mnt->tag != TAG_TIMEOUT)
3543 continue;
3544
3545 if ((! mnt->ready)
3546 && (!mnt->nodev)
3547 && (!is_remote (mnt))
3548 && ((!strncmp (mnt->device, "/dev/", 5))
3549 || (!strncmp (mnt->device, "UUID=", 5))
3550 || (!strncmp (mnt->device, "LABEL=", 6)))
3551 )
3552 {
3553 /* Change the device to be mounted on a pre-registered
3554 * mountpoint
3555 */
3556 if ((!strcmp (mnt->mountpoint, path))) {
3557 /* Change only if the requested device is
3558 * really any different than whats stored
3559 */
3560 if (!strcmp (mnt->device, devname)) {
3561 char * newdev;
3562 ret = 0;
3563 newdev = nih_strdup (mounts, devname);
3564 if (!newdev) {
3565 nih_error_raise_no_memory ();
3566 nih_error (("Could not change the mountpoint "
3567 "for device: %s"), devname);
3568 ret = -1;
3569 }
3570 else {
3571 nih_free (mnt->device);
3572 mnt->device = newdev;
3573 emit_event ("changed-device", mnt);
3574 }
3575 }
3576 break;
3577 }
3578 }
3579 }
3580 return ret;
3581}
3582
3583/**
3359 * options:3584 * options:
3360 *3585 *
3361 * Command-line options accepted by this program.3586 * Command-line options accepted by this program.
@@ -3554,6 +3779,21 @@
35543779
3555 /* See what's already mounted */3780 /* See what's already mounted */
3556 mark_mounted ();3781 mark_mounted ();
3782 /* Create a listening server for private connections. */
3783 while ((ret = control_server_open ()) < 0) {
3784 NihError *err;
3785
3786 err = nih_error_get ();
3787 if (err->number != ENOMEM) {
3788 nih_warn ("%s: %s", _("Unable to listen for private"
3789 "connections"), err->message);
3790 nih_free (err);
3791 break;
3792 }
3793 nih_free (err);
3794 }
3795 if (!ret)
3796 emit_event("mountallServer", NULL);
3557 /* Activate the timer for a fs that is local, unmounted and waits for3797 /* Activate the timer for a fs that is local, unmounted and waits for
3558 * a device to be ready, before it can be mounted onto it. Timer on3798 * a device to be ready, before it can be mounted onto it. Timer on
3559 * only for fs not marked with a "nobootwait=1" */3799 * only for fs not marked with a "nobootwait=1" */
35603800
=== added file 'src/mountall.h'
--- src/mountall.h 1970-01-01 00:00:00 +0000
+++ src/mountall.h 2011-07-15 11:51:33 +0000
@@ -0,0 +1,24 @@
1/* mountall
2 *
3 * Copyright © 2010 Canonical Ltd.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2, as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18
19int stop_dev_timer (const char * mountpoint)
20 __attribute__ ((warn_unused_result));
21int restart_dev_timer (const char * mountpoint)
22 __attribute__ ((warn_unused_result));
23int change_mount_device (const char * devname, const char * path)
24 __attribute__ ((warn_unused_result));
025
=== added directory 'util'
=== added file 'util/Makefile.am'
--- util/Makefile.am 1970-01-01 00:00:00 +0000
+++ util/Makefile.am 2011-07-15 11:51:33 +0000
@@ -0,0 +1,56 @@
1## Process this file with automake to produce Makefile.in
2
3AM_CFLAGS = \
4 $(NIH_CFLAGS) \
5 $(NIH_DBUS_CFLAGS) \
6 $(DBUS_CFLAGS)
7
8AM_CPPFLAGS = \
9 -DLOCALEDIR="\"$(localedir)\"" \
10 -DSBINDIR="\"$(sbindir)\"" \
11 -I$(top_builddir) -I$(top_srcdir) -iquote$(builddir) -iquote$(srcdir) \
12 -I$(top_srcdir)/intl
13
14sbin_PROGRAMS = \
15 mntctl
16
17mntctl_SOURCES = \
18 mntctl.c mntctl.h
19
20nodist_mntctl_SOURCES = \
21 $(com_ubuntu_Mountall_Server_OUTPUTS)
22mntctl_LDADD = \
23 $(LTLIBINTL) \
24 $(NIH_LIBS) \
25 $(NIH_DBUS_LIBS) \
26 $(DBUS_LIBS)
27
28com_ubuntu_Mountall_Server_OUTPUTS = \
29 com.ubuntu.Mountall.Server.c \
30 com.ubuntu.Mountall.Server.h
31
32com_ubuntu_Mountall_Server_XML = \
33 ../dbus/com.ubuntu.Mountall.Server.xml
34
35$(com_ubuntu_Mountall_Server_OUTPUTS): $(com_ubuntu_Mountall_Server_XML)
36 $(AM_V_GEN)$(NIH_DBUS_TOOL) \
37 --package=$(PACKAGE) \
38 --mode=proxy --prefix=mountall_server \
39 --default-interface=com.ubuntu.Mountall0_1.Server \
40 --output=$@ $<
41
42# These have to be built sources because we can't compile object files
43# without the header file existing first
44BUILT_SOURCES = \
45 $(com_ubuntu_Mountall_Server_OUTPUTS)
46
47CLEANFILES = \
48 $(com_ubuntu_Mountall_Server_OUTPUTS)
49
50.PHONY:
51
52clean-local:
53 rm -f *.gcno *.gcda
54
55maintainer-clean-local:
56 rm -f *.gcov
057
=== added file 'util/Makefile.in'
--- util/Makefile.in 1970-01-01 00:00:00 +0000
+++ util/Makefile.in 2011-07-15 11:51:33 +0000
@@ -0,0 +1,669 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18VPATH = @srcdir@
19pkgdatadir = $(datadir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21pkglibdir = $(libdir)/@PACKAGE@
22pkglibexecdir = $(libexecdir)/@PACKAGE@
23am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24install_sh_DATA = $(install_sh) -c -m 644
25install_sh_PROGRAM = $(install_sh) -c
26install_sh_SCRIPT = $(install_sh) -c
27INSTALL_HEADER = $(INSTALL_DATA)
28transform = $(program_transform_name)
29NORMAL_INSTALL = :
30PRE_INSTALL = :
31POST_INSTALL = :
32NORMAL_UNINSTALL = :
33PRE_UNINSTALL = :
34POST_UNINSTALL = :
35build_triplet = @build@
36host_triplet = @host@
37sbin_PROGRAMS = mntctl$(EXEEXT)
38subdir = util
39DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
40ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
41am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
42 $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc2.m4 \
43 $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \
44 $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intl.m4 \
45 $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax.m4 \
46 $(top_srcdir)/m4/inttypes-pri.m4 \
47 $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \
48 $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
49 $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libnih.m4 \
50 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/lock.m4 \
51 $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \
52 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
53 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
54 $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \
55 $(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \
56 $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \
57 $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \
58 $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/m4/wchar_t.m4 \
59 $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \
60 $(top_srcdir)/configure.ac
61am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
62 $(ACLOCAL_M4)
63mkinstalldirs = $(install_sh) -d
64CONFIG_HEADER = $(top_builddir)/config.h
65CONFIG_CLEAN_FILES =
66CONFIG_CLEAN_VPATH_FILES =
67am__installdirs = "$(DESTDIR)$(sbindir)"
68PROGRAMS = $(sbin_PROGRAMS)
69am_mntctl_OBJECTS = mntctl.$(OBJEXT)
70am__objects_1 = com.ubuntu.Mountall.Server.$(OBJEXT)
71nodist_mntctl_OBJECTS = $(am__objects_1)
72mntctl_OBJECTS = $(am_mntctl_OBJECTS) $(nodist_mntctl_OBJECTS)
73am__DEPENDENCIES_1 =
74mntctl_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
75 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
76AM_V_lt = $(am__v_lt_$(V))
77am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
78am__v_lt_0 = --silent
79DEFAULT_INCLUDES =
80depcomp = $(SHELL) $(top_srcdir)/depcomp
81am__depfiles_maybe = depfiles
82am__mv = mv -f
83COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
84 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
85LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
86 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
87 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
88 $(AM_CFLAGS) $(CFLAGS)
89AM_V_CC = $(am__v_CC_$(V))
90am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
91am__v_CC_0 = @echo " CC " $@;
92AM_V_at = $(am__v_at_$(V))
93am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
94am__v_at_0 = @
95CCLD = $(CC)
96LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
97 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
98 $(AM_LDFLAGS) $(LDFLAGS) -o $@
99AM_V_CCLD = $(am__v_CCLD_$(V))
100am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
101am__v_CCLD_0 = @echo " CCLD " $@;
102AM_V_GEN = $(am__v_GEN_$(V))
103am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
104am__v_GEN_0 = @echo " GEN " $@;
105SOURCES = $(mntctl_SOURCES) $(nodist_mntctl_SOURCES)
106DIST_SOURCES = $(mntctl_SOURCES)
107ETAGS = etags
108CTAGS = ctags
109DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
110ACLOCAL = @ACLOCAL@
111ALLOCA = @ALLOCA@
112AMTAR = @AMTAR@
113AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
114AR = @AR@
115AUTOCONF = @AUTOCONF@
116AUTOHEADER = @AUTOHEADER@
117AUTOMAKE = @AUTOMAKE@
118AWK = @AWK@
119BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
120CATOBJEXT = @CATOBJEXT@
121CC = @CC@
122CCDEPMODE = @CCDEPMODE@
123CFLAGS = @CFLAGS@
124CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
125CPP = @CPP@
126CPPFLAGS = @CPPFLAGS@
127CYGPATH_W = @CYGPATH_W@
128DATADIRNAME = @DATADIRNAME@
129DBUS_CFLAGS = @DBUS_CFLAGS@
130DBUS_LIBS = @DBUS_LIBS@
131DEFS = @DEFS@
132DEPDIR = @DEPDIR@
133DSYMUTIL = @DSYMUTIL@
134DUMPBIN = @DUMPBIN@
135ECHO_C = @ECHO_C@
136ECHO_N = @ECHO_N@
137ECHO_T = @ECHO_T@
138EGREP = @EGREP@
139EXEEXT = @EXEEXT@
140FGREP = @FGREP@
141GENCAT = @GENCAT@
142GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
143GLIBC2 = @GLIBC2@
144GLIBC21 = @GLIBC21@
145GMSGFMT = @GMSGFMT@
146GMSGFMT_015 = @GMSGFMT_015@
147GREP = @GREP@
148HAVE_ASPRINTF = @HAVE_ASPRINTF@
149HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
150HAVE_SNPRINTF = @HAVE_SNPRINTF@
151HAVE_VISIBILITY = @HAVE_VISIBILITY@
152HAVE_WPRINTF = @HAVE_WPRINTF@
153INSTALL = @INSTALL@
154INSTALL_DATA = @INSTALL_DATA@
155INSTALL_PROGRAM = @INSTALL_PROGRAM@
156INSTALL_SCRIPT = @INSTALL_SCRIPT@
157INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
158INSTOBJEXT = @INSTOBJEXT@
159INTLBISON = @INTLBISON@
160INTLLIBS = @INTLLIBS@
161INTLOBJS = @INTLOBJS@
162INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
163INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
164LD = @LD@
165LDFLAGS = @LDFLAGS@
166LIBICONV = @LIBICONV@
167LIBINTL = @LIBINTL@
168LIBMULTITHREAD = @LIBMULTITHREAD@
169LIBOBJS = @LIBOBJS@
170LIBPTH = @LIBPTH@
171LIBPTH_PREFIX = @LIBPTH_PREFIX@
172LIBS = @LIBS@
173LIBTHREAD = @LIBTHREAD@
174LIBTOOL = @LIBTOOL@
175LIPO = @LIPO@
176LN_S = @LN_S@
177LTLIBC = @LTLIBC@
178LTLIBICONV = @LTLIBICONV@
179LTLIBINTL = @LTLIBINTL@
180LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
181LTLIBOBJS = @LTLIBOBJS@
182LTLIBPTH = @LTLIBPTH@
183LTLIBTHREAD = @LTLIBTHREAD@
184MAINT = @MAINT@
185MAKEINFO = @MAKEINFO@
186MKDIR_P = @MKDIR_P@
187MSGFMT = @MSGFMT@
188MSGFMT_015 = @MSGFMT_015@
189MSGMERGE = @MSGMERGE@
190NIH_CFLAGS = @NIH_CFLAGS@
191NIH_DBUS_CFLAGS = @NIH_DBUS_CFLAGS@
192NIH_DBUS_LIBS = @NIH_DBUS_LIBS@
193NIH_DBUS_TOOL = @NIH_DBUS_TOOL@
194NIH_LIBS = @NIH_LIBS@
195NM = @NM@
196NMEDIT = @NMEDIT@
197OBJDUMP = @OBJDUMP@
198OBJEXT = @OBJEXT@
199OTOOL = @OTOOL@
200OTOOL64 = @OTOOL64@
201PACKAGE = @PACKAGE@
202PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
203PACKAGE_NAME = @PACKAGE_NAME@
204PACKAGE_STRING = @PACKAGE_STRING@
205PACKAGE_TARNAME = @PACKAGE_TARNAME@
206PACKAGE_URL = @PACKAGE_URL@
207PACKAGE_VERSION = @PACKAGE_VERSION@
208PATH_SEPARATOR = @PATH_SEPARATOR@
209PKG_CONFIG = @PKG_CONFIG@
210PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
211PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
212PLYMOUTH_CFLAGS = @PLYMOUTH_CFLAGS@
213PLYMOUTH_LIBS = @PLYMOUTH_LIBS@
214POSUB = @POSUB@
215PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
216RANLIB = @RANLIB@
217SED = @SED@
218SET_MAKE = @SET_MAKE@
219SHELL = @SHELL@
220STRIP = @STRIP@
221UDEV_CFLAGS = @UDEV_CFLAGS@
222UDEV_LIBS = @UDEV_LIBS@
223USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
224USE_NLS = @USE_NLS@
225VERSION = @VERSION@
226WINDRES = @WINDRES@
227WOE32 = @WOE32@
228WOE32DLL = @WOE32DLL@
229XGETTEXT = @XGETTEXT@
230XGETTEXT_015 = @XGETTEXT_015@
231XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
232abs_builddir = @abs_builddir@
233abs_srcdir = @abs_srcdir@
234abs_top_builddir = @abs_top_builddir@
235abs_top_srcdir = @abs_top_srcdir@
236ac_ct_CC = @ac_ct_CC@
237ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
238am__include = @am__include@
239am__leading_dot = @am__leading_dot@
240am__quote = @am__quote@
241am__tar = @am__tar@
242am__untar = @am__untar@
243bindir = @bindir@
244build = @build@
245build_alias = @build_alias@
246build_cpu = @build_cpu@
247build_os = @build_os@
248build_vendor = @build_vendor@
249builddir = @builddir@
250datadir = @datadir@
251datarootdir = @datarootdir@
252docdir = @docdir@
253dvidir = @dvidir@
254exec_prefix = @exec_prefix@
255host = @host@
256host_alias = @host_alias@
257host_cpu = @host_cpu@
258host_os = @host_os@
259host_vendor = @host_vendor@
260htmldir = @htmldir@
261includedir = @includedir@
262infodir = @infodir@
263install_sh = @install_sh@
264libdir = @libdir@
265libexecdir = @libexecdir@
266localedir = @localedir@
267localstatedir = @localstatedir@
268lt_ECHO = @lt_ECHO@
269mandir = @mandir@
270mkdir_p = @mkdir_p@
271oldincludedir = @oldincludedir@
272pdfdir = @pdfdir@
273prefix = @prefix@
274program_transform_name = @program_transform_name@
275psdir = @psdir@
276sbindir = @sbindir@
277sharedstatedir = @sharedstatedir@
278srcdir = @srcdir@
279sysconfdir = @sysconfdir@
280target_alias = @target_alias@
281top_build_prefix = @top_build_prefix@
282top_builddir = @top_builddir@
283top_srcdir = @top_srcdir@
284AM_CFLAGS = \
285 $(NIH_CFLAGS) \
286 $(NIH_DBUS_CFLAGS) \
287 $(DBUS_CFLAGS)
288
289AM_CPPFLAGS = \
290 -DLOCALEDIR="\"$(localedir)\"" \
291 -DSBINDIR="\"$(sbindir)\"" \
292 -I$(top_builddir) -I$(top_srcdir) -iquote$(builddir) -iquote$(srcdir) \
293 -I$(top_srcdir)/intl
294
295mntctl_SOURCES = \
296 mntctl.c mntctl.h
297
298nodist_mntctl_SOURCES = \
299 $(com_ubuntu_Mountall_Server_OUTPUTS)
300
301mntctl_LDADD = \
302 $(LTLIBINTL) \
303 $(NIH_LIBS) \
304 $(NIH_DBUS_LIBS) \
305 $(DBUS_LIBS)
306
307com_ubuntu_Mountall_Server_OUTPUTS = \
308 com.ubuntu.Mountall.Server.c \
309 com.ubuntu.Mountall.Server.h
310
311com_ubuntu_Mountall_Server_XML = \
312 ../dbus/com.ubuntu.Mountall.Server.xml
313
314
315# These have to be built sources because we can't compile object files
316# without the header file existing first
317BUILT_SOURCES = \
318 $(com_ubuntu_Mountall_Server_OUTPUTS)
319
320CLEANFILES = \
321 $(com_ubuntu_Mountall_Server_OUTPUTS)
322
323all: $(BUILT_SOURCES)
324 $(MAKE) $(AM_MAKEFLAGS) all-am
325
326.SUFFIXES:
327.SUFFIXES: .c .lo .o .obj
328$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
329 @for dep in $?; do \
330 case '$(am__configure_deps)' in \
331 *$$dep*) \
332 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
333 && { if test -f $@; then exit 0; else break; fi; }; \
334 exit 1;; \
335 esac; \
336 done; \
337 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign util/Makefile'; \
338 $(am__cd) $(top_srcdir) && \
339 $(AUTOMAKE) --foreign util/Makefile
340.PRECIOUS: Makefile
341Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
342 @case '$?' in \
343 *config.status*) \
344 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
345 *) \
346 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
347 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
348 esac;
349
350$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
351 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
352
353$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
354 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
355$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
356 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
357$(am__aclocal_m4_deps):
358install-sbinPROGRAMS: $(sbin_PROGRAMS)
359 @$(NORMAL_INSTALL)
360 test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
361 @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
362 for p in $$list; do echo "$$p $$p"; done | \
363 sed 's/$(EXEEXT)$$//' | \
364 while read p p1; do if test -f $$p || test -f $$p1; \
365 then echo "$$p"; echo "$$p"; else :; fi; \
366 done | \
367 sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
368 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
369 sed 'N;N;N;s,\n, ,g' | \
370 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
371 { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
372 if ($$2 == $$4) files[d] = files[d] " " $$1; \
373 else { print "f", $$3 "/" $$4, $$1; } } \
374 END { for (d in files) print "f", d, files[d] }' | \
375 while read type dir files; do \
376 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
377 test -z "$$files" || { \
378 echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
379 $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
380 } \
381 ; done
382
383uninstall-sbinPROGRAMS:
384 @$(NORMAL_UNINSTALL)
385 @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
386 files=`for p in $$list; do echo "$$p"; done | \
387 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
388 -e 's/$$/$(EXEEXT)/' `; \
389 test -n "$$list" || exit 0; \
390 echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
391 cd "$(DESTDIR)$(sbindir)" && rm -f $$files
392
393clean-sbinPROGRAMS:
394 @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \
395 echo " rm -f" $$list; \
396 rm -f $$list || exit $$?; \
397 test -n "$(EXEEXT)" || exit 0; \
398 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
399 echo " rm -f" $$list; \
400 rm -f $$list
401mntctl$(EXEEXT): $(mntctl_OBJECTS) $(mntctl_DEPENDENCIES)
402 @rm -f mntctl$(EXEEXT)
403 $(AM_V_CCLD)$(LINK) $(mntctl_OBJECTS) $(mntctl_LDADD) $(LIBS)
404
405mostlyclean-compile:
406 -rm -f *.$(OBJEXT)
407
408distclean-compile:
409 -rm -f *.tab.c
410
411@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com.ubuntu.Mountall.Server.Po@am__quote@
412@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mntctl.Po@am__quote@
413
414.c.o:
415@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
416@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
417@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
418@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
419@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
420@am__fastdepCC_FALSE@ $(COMPILE) -c $<
421
422.c.obj:
423@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
424@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
425@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
426@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
427@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
428@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
429
430.c.lo:
431@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
432@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
433@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
434@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
435@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
436@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
437
438mostlyclean-libtool:
439 -rm -f *.lo
440
441clean-libtool:
442 -rm -rf .libs _libs
443
444ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
445 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
446 unique=`for i in $$list; do \
447 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
448 done | \
449 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
450 END { if (nonempty) { for (i in files) print i; }; }'`; \
451 mkid -fID $$unique
452tags: TAGS
453
454TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
455 $(TAGS_FILES) $(LISP)
456 set x; \
457 here=`pwd`; \
458 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
459 unique=`for i in $$list; do \
460 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
461 done | \
462 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
463 END { if (nonempty) { for (i in files) print i; }; }'`; \
464 shift; \
465 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
466 test -n "$$unique" || unique=$$empty_fix; \
467 if test $$# -gt 0; then \
468 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
469 "$$@" $$unique; \
470 else \
471 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
472 $$unique; \
473 fi; \
474 fi
475ctags: CTAGS
476CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
477 $(TAGS_FILES) $(LISP)
478 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
479 unique=`for i in $$list; do \
480 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
481 done | \
482 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
483 END { if (nonempty) { for (i in files) print i; }; }'`; \
484 test -z "$(CTAGS_ARGS)$$unique" \
485 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
486 $$unique
487
488GTAGS:
489 here=`$(am__cd) $(top_builddir) && pwd` \
490 && $(am__cd) $(top_srcdir) \
491 && gtags -i $(GTAGS_ARGS) "$$here"
492
493distclean-tags:
494 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
495
496distdir: $(DISTFILES)
497 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
498 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
499 list='$(DISTFILES)'; \
500 dist_files=`for file in $$list; do echo $$file; done | \
501 sed -e "s|^$$srcdirstrip/||;t" \
502 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
503 case $$dist_files in \
504 */*) $(MKDIR_P) `echo "$$dist_files" | \
505 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
506 sort -u` ;; \
507 esac; \
508 for file in $$dist_files; do \
509 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
510 if test -d $$d/$$file; then \
511 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
512 if test -d "$(distdir)/$$file"; then \
513 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
514 fi; \
515 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
516 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
517 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
518 fi; \
519 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
520 else \
521 test -f "$(distdir)/$$file" \
522 || cp -p $$d/$$file "$(distdir)/$$file" \
523 || exit 1; \
524 fi; \
525 done
526check-am: all-am
527check: $(BUILT_SOURCES)
528 $(MAKE) $(AM_MAKEFLAGS) check-am
529all-am: Makefile $(PROGRAMS)
530installdirs:
531 for dir in "$(DESTDIR)$(sbindir)"; do \
532 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
533 done
534install: $(BUILT_SOURCES)
535 $(MAKE) $(AM_MAKEFLAGS) install-am
536install-exec: install-exec-am
537install-data: install-data-am
538uninstall: uninstall-am
539
540install-am: all-am
541 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
542
543installcheck: installcheck-am
544install-strip:
545 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
546 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
547 `test -z '$(STRIP)' || \
548 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
549mostlyclean-generic:
550
551clean-generic:
552 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
553
554distclean-generic:
555 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
556 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
557
558maintainer-clean-generic:
559 @echo "This command is intended for maintainers to use"
560 @echo "it deletes files that may require special tools to rebuild."
561 -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
562clean: clean-am
563
564clean-am: clean-generic clean-libtool clean-local clean-sbinPROGRAMS \
565 mostlyclean-am
566
567distclean: distclean-am
568 -rm -rf ./$(DEPDIR)
569 -rm -f Makefile
570distclean-am: clean-am distclean-compile distclean-generic \
571 distclean-tags
572
573dvi: dvi-am
574
575dvi-am:
576
577html: html-am
578
579html-am:
580
581info: info-am
582
583info-am:
584
585install-data-am:
586
587install-dvi: install-dvi-am
588
589install-dvi-am:
590
591install-exec-am: install-sbinPROGRAMS
592
593install-html: install-html-am
594
595install-html-am:
596
597install-info: install-info-am
598
599install-info-am:
600
601install-man:
602
603install-pdf: install-pdf-am
604
605install-pdf-am:
606
607install-ps: install-ps-am
608
609install-ps-am:
610
611installcheck-am:
612
613maintainer-clean: maintainer-clean-am
614 -rm -rf ./$(DEPDIR)
615 -rm -f Makefile
616maintainer-clean-am: distclean-am maintainer-clean-generic \
617 maintainer-clean-local
618
619mostlyclean: mostlyclean-am
620
621mostlyclean-am: mostlyclean-compile mostlyclean-generic \
622 mostlyclean-libtool
623
624pdf: pdf-am
625
626pdf-am:
627
628ps: ps-am
629
630ps-am:
631
632uninstall-am: uninstall-sbinPROGRAMS
633
634.MAKE: all check install install-am install-strip
635
636.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
637 clean-libtool clean-local clean-sbinPROGRAMS ctags distclean \
638 distclean-compile distclean-generic distclean-libtool \
639 distclean-tags distdir dvi dvi-am html html-am info info-am \
640 install install-am install-data install-data-am install-dvi \
641 install-dvi-am install-exec install-exec-am install-html \
642 install-html-am install-info install-info-am install-man \
643 install-pdf install-pdf-am install-ps install-ps-am \
644 install-sbinPROGRAMS install-strip installcheck \
645 installcheck-am installdirs maintainer-clean \
646 maintainer-clean-generic maintainer-clean-local mostlyclean \
647 mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
648 pdf pdf-am ps ps-am tags uninstall uninstall-am \
649 uninstall-sbinPROGRAMS
650
651
652$(com_ubuntu_Mountall_Server_OUTPUTS): $(com_ubuntu_Mountall_Server_XML)
653 $(AM_V_GEN)$(NIH_DBUS_TOOL) \
654 --package=$(PACKAGE) \
655 --mode=proxy --prefix=mountall_server \
656 --default-interface=com.ubuntu.Mountall0_1.Server \
657 --output=$@ $<
658
659.PHONY:
660
661clean-local:
662 rm -f *.gcno *.gcda
663
664maintainer-clean-local:
665 rm -f *.gcov
666
667# Tell versions [3.59,3.63) of GNU make to not export all variables.
668# Otherwise a system limit (for SysV at least) may be exceeded.
669.NOEXPORT:
0670
=== added file 'util/mntctl.c'
--- util/mntctl.c 1970-01-01 00:00:00 +0000
+++ util/mntctl.c 2011-07-15 11:51:33 +0000
@@ -0,0 +1,387 @@
1/* mountall
2 *
3 * Copyright © 2010 Canonical Ltd.
4 *
5 * This file is based on initctl.c in upstart whose
6 * Author: Scott James Remnant <scott@netsplit.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2, as
10 * published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 */
21
22#ifdef HAVE_CONFIG_H
23# include <config.h>
24#endif /* HAVE_CONFIG_H */
25
26
27#include <dbus/dbus.h>
28
29#include <sys/types.h>
30
31#include <stdio.h>
32#include <stdlib.h>
33#include <unistd.h>
34#include <unistd.h>
35#include <fnmatch.h>
36
37#include <nih/macros.h>
38#include <nih/alloc.h>
39#include <nih/string.h>
40#include <nih/main.h>
41#include <nih/option.h>
42#include <nih/command.h>
43#include <nih/logging.h>
44#include <nih/error.h>
45#include <nih/hash.h>
46#include <nih/tree.h>
47
48#include <nih-dbus/dbus_error.h>
49#include <nih-dbus/dbus_proxy.h>
50#include <nih-dbus/errors.h>
51#include <nih-dbus/dbus_connection.h>
52
53#include "dbus/mountall.h"
54
55#include "com.ubuntu.Mountall.Server.h"
56
57
58/* Prototypes for option and command functions */
59int stop_timer_action (NihCommand *command, char * const *args);
60int restart_timer_action (NihCommand *command, char * const *args);
61int change_mount_device_action (NihCommand *command, char * const *args);
62
63/**
64 * dest_name:
65 *
66 * Name on the D-Bus system bus that the message should be sent to when
67 * system is TRUE.
68 **/
69char *dest_name = NULL;
70
71/**
72 * mountall_open:
73 * @parent: parent object for new proxy.
74 *
75 * Opens a connection to the init daemon and returns a proxy to the manager
76 * object. If @dest_name is not NULL, a connection is instead opened to
77 * the system bus and the proxy linked to the well-known name given.
78 *
79 * Error messages are output to standard error.
80 *
81 * If @parent is not NULL, it should be a pointer to another object which
82 * will be used as a parent for the returned proxy. When all parents
83 * of the returned proxy are freed, the returned proxy will also be
84 * freed.
85 *
86 * Returns: newly allocated D-Bus proxy or NULL on error.
87 **/
88NihDBusProxy *
89mountall_open (const void *parent)
90{
91 DBusError dbus_error;
92 DBusConnection *connection;
93 NihDBusProxy * mountall;
94 int uid = getuid ();
95
96 dbus_error_init (&dbus_error);
97 if (uid) {
98 nih_error ("Need to be root to execute this command ");
99 return NULL;
100 }
101
102 connection = dbus_connection_open (DBUS_ADDRESS_MNTALL, &dbus_error);
103 if (! connection) {
104 nih_error ("%s: %s", _("Unable to connect to mountall"),
105 dbus_error.message);
106 dbus_error_free (&dbus_error);
107 return NULL;
108 }
109 dbus_error_free (&dbus_error);
110
111 mountall = nih_dbus_proxy_new (parent, connection,
112 dest_name,
113 DBUS_PATH_MNTALL,
114 NULL, NULL);
115 if (! mountall) {
116 NihError *err;
117
118 err = nih_error_get ();
119 nih_error ("%s", err->message);
120 nih_free (err);
121
122 dbus_connection_unref (connection);
123 return NULL;
124 }
125 nih_debug("Proxy for Mountall0_1.Server created!");
126 mountall->auto_start = FALSE;
127
128 /* Drop initial reference now the proxy holds one */
129 dbus_connection_unref (connection);
130 return mountall;
131}
132
133/**
134 * stop_timer_action:
135 * @command: NihCommand invoked,
136 * @args: command-line arguments.
137 *
138 * This function is called for the "stop-timer" command.
139 *
140 * Returns: 1 on error and 0 on success.
141 **/
142int
143stop_timer_action (NihCommand * command,
144 char * const *args)
145{
146 nih_local NihDBusProxy *mountall = NULL;
147 NihError * err;
148
149 nih_assert (command != NULL);
150 nih_assert (args != NULL);
151
152 if (!args[0]) {
153 fprintf (stderr, _("%s: missing device name \n"), program_name);
154 nih_main_suggest_help ();
155 return 1;
156 }
157 mountall = mountall_open (NULL);
158 if (! mountall)
159 return 1;
160 if (mountall_server_stop_timer_sync (NULL, mountall, args[0]))
161 goto error;
162 return 0;
163error:
164 err = nih_error_get ();
165 nih_error ("%s", err->message);
166 nih_free (err);
167 return 1;
168}
169
170/**
171 * restart_timer_action:
172 * @command: NihCommand invoked,
173 * @args: command-line arguments.
174 *
175 * This function is called for the "restart-timer" command.
176 *
177 * Returns: 1 on error and 0 on success.
178 **/
179int
180restart_timer_action (NihCommand * command,
181 char * const *args)
182{
183 nih_local NihDBusProxy *mountall = NULL;
184 NihError * err;
185
186 nih_assert (command != NULL);
187 nih_assert (args != NULL);
188
189 if (!args[0]) {
190 fprintf (stderr, _("%s: missing device name \n"), program_name);
191 nih_main_suggest_help ();
192 return 1;
193 }
194 mountall = mountall_open (NULL);
195 if (! mountall)
196 return 1;
197
198 if (mountall_server_restart_timer_sync (NULL, mountall, args[0]))
199 goto error;
200 return 0;
201error:
202 err = nih_error_get ();
203 nih_error ("%s", err->message);
204 nih_free (err);
205 return 1;
206}
207
208/**
209 * change_mount_dev_action:
210 * @command: NihCommand invoked,
211 * @args: command-line arguments.
212 *
213 * This function is called for the "change-mount" command.
214 *
215 * Returns: 1 on error and 0 on success.
216 **/
217int
218change_mount_dev_action (NihCommand * command,
219 char * const *args)
220{
221 nih_local NihDBusProxy *mountall = NULL;
222 NihError * err;
223
224 nih_assert (command != NULL);
225 nih_assert (args != NULL);
226
227 if (!args[0]) {
228 fprintf (stderr, _("%s: missing device name \n"), program_name);
229 nih_main_suggest_help ();
230 return 1;
231 }
232 if (!args[1]) {
233 fprintf (stderr, _("%s: missing mount point \n"), program_name);
234 nih_main_suggest_help ();
235 return 1;
236 }
237 mountall = mountall_open (NULL);
238 if (! mountall)
239 return 1;
240 if (mountall_server_change_mount_device_sync (NULL, mountall,
241 args[0], args[1]))
242 goto error;
243 return 0;
244error:
245 err = nih_error_get ();
246 nih_error ("%s", err->message);
247 nih_free (err);
248 return 1;
249}
250
251/**
252 * version_action:
253 * @command: NihCommand invoked,
254 * @args: command-line arguments.
255 *
256 * This function is called for the "version" command.
257 *
258 * Returns: command exit status.
259 **/
260int
261version_action (NihCommand * command,
262 char * const *args)
263{
264 nih_local NihDBusProxy *mountall = NULL;
265 nih_local char * version = NULL;
266 NihError * err;
267
268 nih_assert (command != NULL);
269 nih_assert (args != NULL);
270
271 mountall = mountall_open (NULL);
272 if (! mountall)
273 return 1;
274
275 if (mountall_server_get_version_sync (NULL, mountall, &version) < 0)
276 goto error;
277
278 nih_message ("%s", version);
279
280 return 0;
281
282error:
283 err = nih_error_get ();
284 nih_error ("%s", err->message);
285 nih_free (err);
286
287 return 1;
288}
289
290#ifndef TEST
291/**
292 * options:
293 *
294 * Command-line options accepted for all arguments.
295 **/
296static NihOption options[] = {
297 NIH_OPTION_LAST
298};
299
300
301NihOption stop_timer_options[] = {
302 NIH_OPTION_LAST
303};
304
305NihOption restart_timer_options[] = {
306 NIH_OPTION_LAST
307};
308
309NihOption change_mnt_dev_options[] = {
310 NIH_OPTION_LAST
311};
312
313/**
314 * version_options:
315 *
316 * Command-line options accepted for the version command.
317 **/
318NihOption version_options[] = {
319 NIH_OPTION_LAST
320};
321
322/**
323 * timer_group:
324 *
325 * Group of commands related to the timer
326 **/
327static NihCommandGroup timer_commands = { N_("Timer") };
328
329/**
330 * mounts_group:
331 *
332 * Group of commands related to mount devices and paths.
333 **/
334static NihCommandGroup mount_commands = { N_("Mounts") };
335
336
337/**
338 * commands:
339 *
340 * Commands accepts as the first non-option argument, or program name.
341 **/
342static NihCommand commands[] = {
343 { "stop-timer", N_("MOUNTPOINT"),
344 N_("Stop a timer associated with the specified device"),
345 N_("MOUNTPOINT is the mountpoint corresponding to a device whose "
346 "timer you want to stop"),
347 &timer_commands, stop_timer_options, stop_timer_action },
348
349 { "restart-timer", N_("MOUNTPOINT"),
350 N_("Restart a timer associated with the specified device"),
351 N_("MOUNTPOINT is the mountpoint corresponding to a device that "
352 "should become ready withing the default wait time or the time "
353 "specified explicitly as a command line argument to mountall") ,
354 &timer_commands, restart_timer_options, restart_timer_action },
355
356 { "change-mount", N_("DEVICE-NAME PATH"),
357 N_("Change the device to mount at a given mountpoint specified in "
358 "/etc/fstab" ),
359 N_("DEVICE-NAME is the name of the new device that you want to mount "
360 "PATH is the full path specified in /etc/fstab") ,
361 &mount_commands, change_mnt_dev_options, change_mount_dev_action },
362
363 { "version", NULL,
364 N_("Request the version of the mountall daemon."),
365 NULL,
366 NULL, version_options, version_action },
367
368 NIH_COMMAND_LAST
369};
370
371int
372main (int argc,
373 char *argv[])
374{
375 int ret;
376
377 nih_main_init (argv[0]);
378
379 ret = nih_command_parser (NULL, argc, argv, options, commands);
380 if (ret < 0)
381 exit (1);
382
383 dbus_shutdown ();
384
385 return ret;
386}
387#endif

Subscribers

People subscribed via source and target branches