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