* Respect the "nobootwait" mount option for filesystems under /var and
/usr. svn path=/nixpkgs/trunk/; revision=22510
This commit is contained in:
parent
0bb5538ec7
commit
84b56ade89
@ -12,7 +12,7 @@ diff -ru -x '*~' mountall-2.15-orig/configure.ac mountall-2.15/configure.ac
|
|||||||
|
|
||||||
diff -ru -x '*~' mountall-2.15-orig/src/mountall.c mountall-2.15/src/mountall.c
|
diff -ru -x '*~' mountall-2.15-orig/src/mountall.c mountall-2.15/src/mountall.c
|
||||||
--- mountall-2.15-orig/src/mountall.c 2010-05-09 01:42:24.000000000 +0200
|
--- mountall-2.15-orig/src/mountall.c 2010-05-09 01:42:24.000000000 +0200
|
||||||
+++ mountall-2.15/src/mountall.c 2010-06-07 13:04:19.000000000 +0200
|
+++ mountall-2.15/src/mountall.c 2010-07-07 14:40:47.000000000 +0200
|
||||||
@@ -64,8 +64,10 @@
|
@@ -64,8 +64,10 @@
|
||||||
#include <nih-dbus/dbus_proxy.h>
|
#include <nih-dbus/dbus_proxy.h>
|
||||||
#include <nih-dbus/errors.h>
|
#include <nih-dbus/errors.h>
|
||||||
@ -80,7 +80,22 @@ diff -ru -x '*~' mountall-2.15-orig/src/mountall.c mountall-2.15/src/mountall.c
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* plymouth_error:
|
* plymouth_error:
|
||||||
@@ -1475,7 +1485,8 @@
|
@@ -1208,11 +1218,12 @@
|
||||||
|
nih_debug ("%s is root filesystem", MOUNT_NAME (mnt));
|
||||||
|
tag = TAG_LOCAL;
|
||||||
|
} else if (is_remote (mnt)) {
|
||||||
|
- if ((! strcmp (mnt->mountpoint, "/usr"))
|
||||||
|
+ if ((! has_option (mnt, "nobootwait", FALSE)) && (
|
||||||
|
+ (! strcmp (mnt->mountpoint, "/usr"))
|
||||||
|
|| (! strcmp (mnt->mountpoint, "/var"))
|
||||||
|
|| (! strncmp (mnt->mountpoint, "/usr/", 5))
|
||||||
|
|| (! strncmp (mnt->mountpoint, "/var/", 5))
|
||||||
|
- || (has_option (mnt, "bootwait", FALSE)))
|
||||||
|
+ || (has_option (mnt, "bootwait", FALSE))))
|
||||||
|
{
|
||||||
|
tag = TAG_REMOTE;
|
||||||
|
} else {
|
||||||
|
@@ -1475,7 +1486,8 @@
|
||||||
/* Enforce local only after virtual filesystems triggered */
|
/* Enforce local only after virtual filesystems triggered */
|
||||||
if ((! local_triggered)
|
if ((! local_triggered)
|
||||||
&& virtual_triggered
|
&& virtual_triggered
|
||||||
@ -90,7 +105,7 @@ diff -ru -x '*~' mountall-2.15-orig/src/mountall.c mountall-2.15/src/mountall.c
|
|||||||
nih_info (_("%s finished"), "local");
|
nih_info (_("%s finished"), "local");
|
||||||
emit_event ("local-filesystems", NULL);
|
emit_event ("local-filesystems", NULL);
|
||||||
local_triggered = TRUE;
|
local_triggered = TRUE;
|
||||||
@@ -1484,7 +1495,8 @@
|
@@ -1484,7 +1496,8 @@
|
||||||
/* Enforce remote only after virtual filesystems triggrered */
|
/* Enforce remote only after virtual filesystems triggrered */
|
||||||
if ((! remote_triggered)
|
if ((! remote_triggered)
|
||||||
&& virtual_triggered
|
&& virtual_triggered
|
||||||
@ -100,7 +115,7 @@ diff -ru -x '*~' mountall-2.15-orig/src/mountall.c mountall-2.15/src/mountall.c
|
|||||||
nih_info (_("%s finished"), "remote");
|
nih_info (_("%s finished"), "remote");
|
||||||
emit_event ("remote-filesystems", NULL);
|
emit_event ("remote-filesystems", NULL);
|
||||||
remote_triggered = TRUE;
|
remote_triggered = TRUE;
|
||||||
@@ -1494,7 +1506,9 @@
|
@@ -1494,7 +1507,9 @@
|
||||||
if ((! filesystem_triggered)
|
if ((! filesystem_triggered)
|
||||||
&& virtual_triggered
|
&& virtual_triggered
|
||||||
&& local_triggered
|
&& local_triggered
|
||||||
@ -111,7 +126,7 @@ diff -ru -x '*~' mountall-2.15-orig/src/mountall.c mountall-2.15/src/mountall.c
|
|||||||
nih_info (_("All filesystems mounted"));
|
nih_info (_("All filesystems mounted"));
|
||||||
emit_event ("filesystem", NULL);
|
emit_event ("filesystem", NULL);
|
||||||
filesystem_triggered = TRUE;
|
filesystem_triggered = TRUE;
|
||||||
@@ -1508,9 +1522,9 @@
|
@@ -1508,9 +1523,9 @@
|
||||||
swap_triggered = TRUE;
|
swap_triggered = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,7 +139,7 @@ diff -ru -x '*~' mountall-2.15-orig/src/mountall.c mountall-2.15/src/mountall.c
|
|||||||
num_virtual_mounted, num_virtual,
|
num_virtual_mounted, num_virtual,
|
||||||
num_swap_mounted, num_swap);
|
num_swap_mounted, num_swap);
|
||||||
}
|
}
|
||||||
@@ -2203,12 +2217,14 @@
|
@@ -2203,12 +2218,14 @@
|
||||||
if (no_events)
|
if (no_events)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -140,7 +155,7 @@ diff -ru -x '*~' mountall-2.15-orig/src/mountall.c mountall-2.15/src/mountall.c
|
|||||||
env = NIH_MUST (nih_str_array_new (NULL));
|
env = NIH_MUST (nih_str_array_new (NULL));
|
||||||
|
|
||||||
if (mnt) {
|
if (mnt) {
|
||||||
@@ -2787,6 +2803,7 @@
|
@@ -2787,6 +2804,7 @@
|
||||||
int
|
int
|
||||||
plymouth_connect (void)
|
plymouth_connect (void)
|
||||||
{
|
{
|
||||||
@ -148,7 +163,7 @@ diff -ru -x '*~' mountall-2.15-orig/src/mountall.c mountall-2.15/src/mountall.c
|
|||||||
/* If we were already connected, just re-use that connection */
|
/* If we were already connected, just re-use that connection */
|
||||||
if (ply_boot_client)
|
if (ply_boot_client)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -2813,8 +2830,13 @@
|
@@ -2813,8 +2831,13 @@
|
||||||
nih_info (_("Connected to Plymouth"));
|
nih_info (_("Connected to Plymouth"));
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -162,7 +177,7 @@ diff -ru -x '*~' mountall-2.15-orig/src/mountall.c mountall-2.15/src/mountall.c
|
|||||||
void
|
void
|
||||||
plymouth_disconnected (void * user_data,
|
plymouth_disconnected (void * user_data,
|
||||||
ply_boot_client_t *client)
|
ply_boot_client_t *client)
|
||||||
@@ -2827,6 +2849,7 @@
|
@@ -2827,6 +2850,7 @@
|
||||||
ply_boot_client_free (ply_boot_client);
|
ply_boot_client_free (ply_boot_client);
|
||||||
ply_boot_client = NULL;
|
ply_boot_client = NULL;
|
||||||
}
|
}
|
||||||
@ -170,7 +185,7 @@ diff -ru -x '*~' mountall-2.15-orig/src/mountall.c mountall-2.15/src/mountall.c
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -2837,6 +2860,7 @@
|
@@ -2837,6 +2861,7 @@
|
||||||
|
|
||||||
nih_assert (mnt != NULL);
|
nih_assert (mnt != NULL);
|
||||||
|
|
||||||
@ -178,7 +193,7 @@ diff -ru -x '*~' mountall-2.15-orig/src/mountall.c mountall-2.15/src/mountall.c
|
|||||||
/* No Plymouth => no progress information */
|
/* No Plymouth => no progress information */
|
||||||
if (! plymouth_connect ())
|
if (! plymouth_connect ())
|
||||||
return;
|
return;
|
||||||
@@ -2866,6 +2890,7 @@
|
@@ -2866,6 +2891,7 @@
|
||||||
plymouth_response,
|
plymouth_response,
|
||||||
plymouth_failed,
|
plymouth_failed,
|
||||||
NULL);
|
NULL);
|
||||||
@ -186,7 +201,7 @@ diff -ru -x '*~' mountall-2.15-orig/src/mountall.c mountall-2.15/src/mountall.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -2881,20 +2906,31 @@
|
@@ -2881,20 +2907,31 @@
|
||||||
NIH_LIST_FOREACH (mounts, iter) {
|
NIH_LIST_FOREACH (mounts, iter) {
|
||||||
Mount *mnt = (Mount *)iter;
|
Mount *mnt = (Mount *)iter;
|
||||||
|
|
||||||
@ -220,7 +235,7 @@ diff -ru -x '*~' mountall-2.15-orig/src/mountall.c mountall-2.15/src/mountall.c
|
|||||||
/* If we're already displaying messages, don't change them unless
|
/* If we're already displaying messages, don't change them unless
|
||||||
* the message is no longer valid for that mount point; otherwise
|
* the message is no longer valid for that mount point; otherwise
|
||||||
* clear the message.
|
* clear the message.
|
||||||
@@ -3005,8 +3041,10 @@
|
@@ -3005,8 +3042,10 @@
|
||||||
plymouth_answer,
|
plymouth_answer,
|
||||||
plymouth_failed,
|
plymouth_failed,
|
||||||
NULL);
|
NULL);
|
||||||
@ -231,7 +246,7 @@ diff -ru -x '*~' mountall-2.15-orig/src/mountall.c mountall-2.15/src/mountall.c
|
|||||||
void
|
void
|
||||||
plymouth_response (void * user_data,
|
plymouth_response (void * user_data,
|
||||||
ply_boot_client_t *client)
|
ply_boot_client_t *client)
|
||||||
@@ -3125,7 +3163,7 @@
|
@@ -3125,7 +3164,7 @@
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -240,7 +255,7 @@ diff -ru -x '*~' mountall-2.15-orig/src/mountall.c mountall-2.15/src/mountall.c
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3211,6 +3249,7 @@
|
@@ -3211,6 +3250,7 @@
|
||||||
(NihIoWatcher)udev_monitor_watcher,
|
(NihIoWatcher)udev_monitor_watcher,
|
||||||
udev_monitor));
|
udev_monitor));
|
||||||
|
|
||||||
@ -248,7 +263,7 @@ diff -ru -x '*~' mountall-2.15-orig/src/mountall.c mountall-2.15/src/mountall.c
|
|||||||
/* Initialise a Plymouth event loop; this is an epoll instance that
|
/* Initialise a Plymouth event loop; this is an epoll instance that
|
||||||
* we can poll within our own main loop and call out to when needs
|
* we can poll within our own main loop and call out to when needs
|
||||||
* be.
|
* be.
|
||||||
@@ -3224,6 +3263,7 @@
|
@@ -3224,6 +3264,7 @@
|
||||||
|
|
||||||
/* Attempt an early connection to Plymouth */
|
/* Attempt an early connection to Plymouth */
|
||||||
plymouth_connect ();
|
plymouth_connect ();
|
||||||
@ -256,7 +271,7 @@ diff -ru -x '*~' mountall-2.15-orig/src/mountall.c mountall-2.15/src/mountall.c
|
|||||||
|
|
||||||
mounts = NIH_MUST (nih_list_new (NULL));
|
mounts = NIH_MUST (nih_list_new (NULL));
|
||||||
|
|
||||||
@@ -3236,7 +3276,9 @@
|
@@ -3236,7 +3277,9 @@
|
||||||
* from /etc/fstab and /proc/self/mountinfo to find out what else
|
* from /etc/fstab and /proc/self/mountinfo to find out what else
|
||||||
* we need to do.
|
* we need to do.
|
||||||
*/
|
*/
|
||||||
@ -266,7 +281,7 @@ diff -ru -x '*~' mountall-2.15-orig/src/mountall.c mountall-2.15/src/mountall.c
|
|||||||
parse_fstab (_PATH_MNTTAB);
|
parse_fstab (_PATH_MNTTAB);
|
||||||
parse_mountinfo ();
|
parse_mountinfo ();
|
||||||
|
|
||||||
@@ -3338,10 +3380,12 @@
|
@@ -3338,10 +3381,12 @@
|
||||||
/* Flush the D-Bus connection to ensure all messages are sent */
|
/* Flush the D-Bus connection to ensure all messages are sent */
|
||||||
dbus_connection_flush (connection);
|
dbus_connection_flush (connection);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user