[ostree] os-init: also create a symlink for /var/lock
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] os-init: also create a symlink for /var/lock
- Date: Thu, 13 Feb 2014 02:54:50 +0000 (UTC)
commit d4f86fdef22ba7cf36128efe1bdfdfa800692c7f
Author: Cosimo Cecchi <cosimo endlessm com>
Date: Tue Feb 11 17:15:19 2014 -0800
os-init: also create a symlink for /var/lock
After creating one for /var/run. This is needed at least on Debian
systems.
src/ostree/ot-admin-builtin-os-init.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/ostree/ot-admin-builtin-os-init.c b/src/ostree/ot-admin-builtin-os-init.c
index e151506..38c2187 100644
--- a/src/ostree/ot-admin-builtin-os-init.c
+++ b/src/ostree/ot-admin-builtin-os-init.c
@@ -96,6 +96,16 @@ ot_admin_builtin_os_init (int argc, char **argv, OstreeSysroot *sysroot, GCancel
}
}
+ dir = ot_gfile_get_child_build_path (deploy_dir, "var", "lock", NULL);
+ if (!g_file_test (gs_file_get_path_cached (dir), G_FILE_TEST_IS_SYMLINK))
+ {
+ if (symlink ("../run/lock", gs_file_get_path_cached (dir)) < 0)
+ {
+ ot_util_set_error_from_errno (error, errno);
+ goto out;
+ }
+ }
+
g_print ("%s initialized as OSTree root\n", gs_file_get_path_cached (deploy_dir));
ret = TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]