Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
steam
systemd
Commits
2f8cd170
Commit
2f8cd170
authored
Nov 18, 2010
by
Lennart Poettering
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cryptsetup: automatically order crypt partitions before cryptsetup.target
parent
21931dbe
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
6 deletions
+40
-6
Makefile.am
Makefile.am
+5
-2
TODO
TODO
+1
-3
src/cryptsetup-generator.c
src/cryptsetup-generator.c
+20
-1
units/cryptsetup.target
units/cryptsetup.target
+14
-0
No files found.
Makefile.am
View file @
2f8cd170
...
...
@@ -188,6 +188,7 @@ dist_systemunit_DATA = \
units/halt.target
\
units/kexec.target
\
units/local-fs.target
\
units/cryptsetup.target
\
units/network.target
\
units/nss-lookup.target
\
units/mail-transfer-agent.target
\
...
...
@@ -1161,12 +1162,14 @@ install-data-hook:
fsck-root.service
\
remount-rootfs.service
\
var-run.mount
\
var-lock.mount
&&
\
var-lock.mount
\
cryptsetup.target
&&
\
$(LN_S)
../systemd-remount-api-vfs.service systemd-remount-api-vfs.service
&&
\
$(LN_S)
../fsck-root.service fsck-root.service
&&
\
$(LN_S)
../remount-rootfs.service remount-rootfs.service
&&
\
$(LN_S)
../var-run.mount var-run.mount
&&
\
$(LN_S)
../var-lock.mount var-lock.mount
)
$(LN_S)
../var-lock.mount var-lock.mount
&&
\
$(LN_S)
../cryptsetup.target
)
(
cd
$(DESTDIR)$(userunitdir)
&&
\
rm
-f
shutdown.target sockets.target local-fs.target swap.target bluetooth.target printer.target
&&
\
$(LN_S)
$(systemunitdir)
/shutdown.target shutdown.target
&&
\
...
...
TODO
View file @
2f8cd170
...
...
@@ -88,12 +88,10 @@
* add to cpu cgroup by default
* introduce crypttab.target
External:
* make cryptsetup lower --iter-time
External:
* patch kernel for xattr support in /dev, /proc/, /sys and /sys/fs/cgroup.
* patch kernel for cpu feature modalias for autoloading aes/kvm/...
...
...
src/cryptsetup-generator.c
View file @
2f8cd170
...
...
@@ -102,7 +102,7 @@ static int create_disk(
"DefaultDependencies=no
\n
"
"BindTo=%s dev-mapper-%%i.device
\n
"
"After=systemd-readahead-collect.service systemd-readahead-replay.service %s
\n
"
"Before=dev-mapper-%%i.device shutdown.target
local-fs
.target
\n
"
,
"Before=dev-mapper-%%i.device shutdown.target
cryptsetup
.target
\n
"
,
d
,
d
);
if
(
password
&&
(
streq
(
password
,
"/dev/urandom"
)
||
...
...
@@ -157,6 +157,25 @@ static int create_disk(
r
=
-
errno
;
goto
fail
;
}
free
(
to
);
to
=
NULL
;
if
(
!
options
||
!
has_option
(
options
,
"nofail"
))
{
if
(
asprintf
(
&
to
,
"%s/cryptsetup.target.wants/%s"
,
arg_dest
,
n
)
<
0
)
{
r
=
-
ENOMEM
;
goto
fail
;
}
mkdir_parents
(
to
,
0755
);
if
(
symlink
(
from
,
to
)
<
0
)
{
log_error
(
"Failed to create symlink '%s' to '%s': %m"
,
from
,
to
);
r
=
-
errno
;
goto
fail
;
}
}
}
free
(
to
);
...
...
units/cryptsetup.target
0 → 100644
View file @
2f8cd170
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# See systemd.special(7) for details
[Unit]
Description=Encrypted Volumes
[Install]
WantedBy=local-fs.target
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment