b26fa1a2fbcfee7d03b0c8fd15ec3aa64ae70b9f |
|
10-Feb-2016 |
Daniel Mack <daniel@zonque.org> |
tree-wide: remove Emacs lines from all files
This should be handled fine now by .dir-locals.el, so need to carry that
stuff in every file. |
104bc12fbc23c3ca852d9d389805c615cd590d01 |
|
17-Jan-2016 |
nmartensen <nis.martensen@web.de> |
fstab-generator: fix ordering of /sysroot/usr mount
According to bootup(7) and the behavior when /usr is specified in /etc/fstab, the /sysroot/usr mount should be before initrd-fs.target, not before initrd-root-fs.target. |
ce3f6d82b003f365f718f24e48f55b8a0372b924 |
|
15-Jan-2016 |
nmartensen <nis.martensen@web.de> |
fstab-generator: remove bogus condition
The sysroot mount is already taken care of by the add_sysroot_mount function. With this condition left in, we can get something like this:
initrd-root-fs.target.requires
`-- usr.mount -> /run/systemd/generator/usr.mount
in the main system (i.e., not in the initramfs). In the initramfs, the previous condition already kicks in. |
0d3d3be1e225d51ebf46fb40a89419eb6a7d334e |
|
25-Nov-2015 |
Franck Bui <fbui@suse.com> |
fstab-gen: post can't be NULL |
b5efdb8af40ea759a1ea584c1bc44ecc81dd00ce |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out allocation calls into alloc-util.[ch] |
4e731273edfe852a3eee2949cd20f49fd5b4f6d7 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: move /proc/cmdline parsing code to proc-cmdline.[ch] |
8fcde01280adcbd07e8205b91ac52b06305b6208 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split stat()/statfs()/stavfs() related calls into stat-util.[ch] |
4349cd7c1d153c4ffa23cf1cff1644e0afa9bcf0 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: move mount related utility calls to mount-util.[ch] |
0d39fa9c69b97a2ceb156053deef69c0866c2b97 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: move more file I/O related calls into fileio.[ch] |
6bedfcbb2970e06a4d3280c8fb62083d252ede73 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split string parsing related calls from util.[ch] into parse-util.[ch] |
3ffd4af22052963e7a29431721ee204e634bea75 |
|
25-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out fd-related operations into fd-util.[ch]
There are more than enough to deserve their own .c file, hence move them
over. |
07630cea1f3a845c09309f197ac7c4f11edd3b62 |
|
24-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split our string related calls from util.[ch] into its own file string-util.[ch]
There are more than enough calls doing string manipulations to deserve
its own files, hence do something about it.
This patch also sorts the #include blocks of all files that needed to be
updated, according to the sorting suggestions from CODING_STYLE. Since
pretty much every file needs our string manipulation functions this
effectively means that most files have sorted #include blocks now.
Also touches a few unrelated include files. |
75f86906c52735c98dc0aa7e24b773edb42ee814 |
|
07-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
basic: rework virtualization detection API
Introduce a proper enum, and don't pass around string ids anymore. This
simplifies things quite a bit, and makes virtualization detection more
similar to architecture detection. |
bf1d7ba70aceddb5dae0cd2e370b8afaf0c81b05 |
|
25-May-2015 |
Karel Zak <kzak@redhat.com> |
swap: use swapon -o
This patch simplify swapon usage in systemd. The command swapon(8)
since util-linux v2.26 supports "-o <list>". The idea is exactly the
same like for mount(8). The -o specifies options in fstab-compatible
way. For systemd it means that it does not have to care about things
like "discard" or another swapon specific options.
swapon -o <options-from-fstab>
For backward compatibility the code cares about "Priority:" swap unit
field (for a case when Priority: is set, but pri= in the Options: is
missing).
References: http://lists.freedesktop.org/archives/systemd-devel/2014-October/023576.html |
3519d230c8bafe834b2dac26ace49fcfba139823 |
|
18-May-2015 |
Karel Zak <kzak@redhat.com> |
fstab-generator: add x-systemd.requires and x-systemd.requires-mounts-for
Currently we have no way how to specify dependencies between fstab
entries (or another units) in the /etc/fstab. It means that users are
forced to bypass fstab and write .mount units manually.
The patch introduces new systemd fstab options:
x-systemd.requires=<PATH>
- to specify dependence an another mount (PATH is translated to unit name)
x-systemd.requires=<UNIT>
- to specify dependence on arbitrary UNIT
x-systemd.requires-mounts-for=<PATH ...>
- to specify dependence on another paths, implemented by
RequiresMountsFor=. The option may be specified more than once.
For example two bind mounts where B depends on A:
/mnt/test/A /mnt/test/A none bind,defaults
/mnt/test/A /mnt/test/B none bind,x-systemd.requires=/mnt/test/A
More complex example with overlay FS where one mount point depends on
"low" and "upper" directories:
/dev/sdc1 /mnt/low ext4 defaults
/dev/sdc2 /mnt/high ext4 defaults
overlay /mnt/merged overlay lowerdir=/mnt/low,upperdir=/mnt/high/data,workdir=/mnt/high/work,x-systemd.requires-mounts-for=/mnt/low,x-systemd.requires-mounts-for=mnt/high
https://bugzilla.redhat.com/show_bug.cgi?id=812826
https://bugzilla.redhat.com/show_bug.cgi?id=1164334 |
4652c56c59682f153c34d30b410534e4f0c6fd6a |
|
17-May-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Use fflush_and_check() in more places |
7410616cd9dbbec97cf98d75324da5cda2b2f7a2 |
|
06-May-2015 |
Lennart Poettering <lennart@poettering.net> |
core: rework unit name validation and manipulation logic
A variety of changes:
- Make sure all our calls distuingish OOM from other errors if OOM is
not the only error possible.
- Be much stricter when parsing escaped paths, do not accept trailing or
leading escaped slashes.
- Change unit validation to take a bit mask for allowing plain names,
instance names or template names or an combination thereof.
- Refuse manipulating invalid unit name |
2e8522767e27d5686206794c69e0aa95da6e798b |
|
04-May-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
generators: rename add_{root,usr}_mount to add_{sysroot,sysroot_usr}_mount
This makes it obvious that those functions are only usable in the
initramfs.
Also, add a warning when noauto, nofail, or automount is used for the
root fs, instead of silently ignoring. Using those options would be a
sign of significant misconfiguration, and if we bother to check for
them, than let's go all the way and complain.
Other various small cleanups and reformattings elsewhere. |
336b5c615e9c101476784b32df1b86aaeac96431 |
|
02-May-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
fstab-generator: fix memleak
filtered was used to store an allocated string twice. The first allocation was
thus lost. The string is not needed for anything, so simply skip the allocation.
Fixup for deb0a77cf0b409141c4. |
deb0a77cf0b409141c4b116ae30becb3d878e1ad |
|
21-Apr-2015 |
Michael Olbrich <m.olbrich@pengutronix.de> |
automount: add expire support |
171181bcd64d5a128f6678107d18ffa1c9388b94 |
|
08-Apr-2015 |
Lennart Poettering <lennart@poettering.net> |
fstab-generator: don't continue on OOM |
093c2cfe3b1ae6081f12927ae7906d90d6623534 |
|
25-Mar-2015 |
Tobias Hunger <tobias.hunger@gmail.com> |
fstab-generator: don't accept missing root=, but accept root=none
And other non-device entries (like fstab does).
Mount whatever the user asked to be mounted on / on the kernel
command line. Do less sanity check and do *not* bail out
when the mount device looks strange or does not exist.
This basically makes the changes for deviceless filesystems
from yesterday unnecessary and is in line with what we do for
filesystems set up in fstab.
Remove some code that is now dead (reverting fb02a2775a65 and
b0438462).
[tomegun:
- change patch title/description a bit.
- don't touch the /usr logic, that would be a separate change and
we don't currently have a convincing use-case for that.
- don't bail out on /sys ro. This only makes sense in containers,
where we would not be doing this anyway. If there is a use-case
we could consider that as a separate patch.] |
b0438462089d1e1460429a57718305de08985908 |
|
24-Mar-2015 |
Tobias Hunger <tobias.hunger@gmail.com> |
fstab-generator: Support root on tmpfs (or other deviceless FS)
This allows for stateless systems. |
e0952d9d021234e79f3a70f33a9e5d201872a417 |
|
21-Mar-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
fstab-generator: ignore invalid swap priority
A failed priority is not something worth stopping boot over. Most people
have only one swap device, in which case priority is irrelevant, and even
if there is more than one swap device, they are all usable, and ignoring the
priority field should only result in some loss of performance.
The kernel will report the priority as -1 if not set, so it's easy for
people to make this mistake.
https://bugzilla.redhat.com/show_bug.cgi?id=1204336 |
2eec67acbb00593e414549a7e5b35eb7dd776b1b |
|
23-Feb-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
remove unused includes
This patch removes includes that are not used. The removals were found with
include-what-you-use which checks if any of the symbols from a header is
in use. |
63c372cb9df3bee01e3bf8cd7f96f336bddda846 |
|
03-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
util: rework strappenda(), and rename it strjoina()
After all it is now much more like strjoin() than strappend(). At the
same time, add support for NULL sentinels, even if they are normally not
necessary. |
b9f111b93f9f442f00266f338b14f25ca8685352 |
|
12-Jan-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Support negated fstab options
We would ignore options like "fail" and "auto", and for any option
which takes a value the first assignment would win. Repeated and
options equivalent to the default are rarely used, but they have been
documented forever, and people might use them. Especially on the
kernel command line it is easier to append a repeated or negated
option at the end. |
d15d0333be6a1ca7fdd99a1881d967b6be8f387a |
|
12-Jan-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Add new function to filter fstab options
This fixes parsing of options in shared/generator.c. Existing code
had some issues:
- it would treate whitespace and semicolons as seperators. fstab(5)
is pretty clear that only commas matter. And the syntax does
not allow for spaces to be inserted in the field in fstab.
Whitespace might be escaped, but then it should not seperate
options. Treat whitespace and semicolons as any other character.
- it assumed that x-systemd.device-timeout would always be followed
by "=". But this is not guaranteed, hasmntopt will return this
option even if there's no value. Uninitialized memory could be read.
- some error paths would log, and inconsistently, some would just
return an error code.
Filtering is split out to a separate function and tests are added.
Similar code paths in other places are adjusted to use the new function. |
00b4ffdecbb39d849af65c0ab741be482325a4a9 |
|
05-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
fstab-generator: use more appropriate checks for swap and device availability
We always should use the same checks when deciding whether swap support
and mounting of devices is supported. Hence, let's make
fstab-generator's logic more similar to the usual logic we follow:
a) Look for /proc/swaps and no container support before activating
swaps.
b) Look for /sys being writable befire supporting device mounts. |
eb5800026d5a6754514fb8f8a8561b49974fc879 |
|
09-Dec-2014 |
Michael Marineau <michael.marineau@coreos.com> |
fstab-generator: Allow mount.usr without mount.usrflags, honor rw/ro
There is no need to require mount.usrflags. The original implementation
assumed that a btrfs subvolume would always be needed but that is not
applicable to systems that do not use btrfs for /usr.
Similar to using rootflags= for the default of mount.usrflags=, append
the classic 'ro' and 'rw' flags to the mount options. |
59cfa62f20f566b2c0279405b302e890812b3334 |
|
09-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
fstab-generator: free all allocated strings |
4a62c710b62a5a3c7a8a278b810b9d5b5a0c8f4f |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: another round of simplifications
Using the same scripts as in f647962d64e "treewide: yet more log_*_errno
+ return simplifications". |
56f64d95763a799ba4475daf44d8e9f72a1bd474 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: use log_*_errno whenever %m is in the format string
If the format string contains %m, clearly errno must have a meaningful
value, so we might as well use log_*_errno to have ERRNO= logged.
Using:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/'
Plus some whitespace, linewrap, and indent adjustments. |
23bbb0de4e3f85d9704a5c12a5afa2dfa0159e41 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: more log_*_errno + return simplifications |
da927ba997d68401563b927f92e6e40e021a8e5c |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: no need to negate errno for log_*_errno()
It corrrectly handles both positive and negative errno values. |
0a1beeb64207eaa88ab9236787b1cbc2f704ae14 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: auto-convert the simple cases to log_*_errno()
As a followup to 086891e5c1 "log: add an "error" parameter to all
low-level logging calls and intrdouce log_error_errno() as log calls
that take error numbers", use sed to convert the simple cases to use
the new macros:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/'
Multi-line log_*() invocations are not covered.
And we also should add log_unit_*_errno(). |
5607d856b8606ba75446a07ab5e9048753e1d7a6 |
|
26-Nov-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
swap: restore support for nofail
systemd stops adding automatic dependencies on swap.target to swap
units. If a dependency is required, it has to be added by unit
configuration. fstab-generator did that already, except that now it is
modified to create a Requires or Wants type dependency, depending on
whether nofail is specified in /etc/fstab. This makes .swap units
obey the nofail/noauto options more or less the same as .mount units.
Documentation is extended to clarify that, and to make
systemd.mount(5) and system.swap(5) more similar. The gist is not
changed, because current behaviour actually matches existing
documentation.
https://bugs.freedesktop.org/show_bug.cgi?id=86488 |
b5884878a2874447b2a9f07f324a7cd909d96d48 |
|
07-Nov-2014 |
Lennart Poettering <lennart@poettering.net> |
util: simplify proc_cmdline() to reuse get_process_cmdline()
Also, make all parsing of the kernel cmdline non-fatal. |
3f85ef0f05ffc51e19f86fb83a1c51e8e3cd6817 |
|
06-Nov-2014 |
Harald Hoyer <harald@redhat.com> |
s/commandline/command line/g |
47cb901e38cd7092576fc8e76cc4a14f39bf719d |
|
28-Oct-2014 |
Lennart Poettering <lennart@poettering.net> |
swap: replace Discard= setting by a more generic Options= setting
For now, it's systemd itself that parses the options string, but as soon
as util-linux' swapon can take the option string directly with -o we
should pass it on unmodified. |
9f103625b145a397e67c3714766775b615c8b587 |
|
10-Oct-2014 |
Tobias Hunger <tobias.hunger@gmail.com> |
fstab-generator: Honor mount.usr*= on kernel command line
This allows to configure boot loader entries for systems where the
root and usr filesystems are in different subvolumes (or even on
different drives). |
f88dc3edeb9c49622fcc773cb6153238fe9efbe2 |
|
04-Oct-2014 |
Tobias Hunger <tobias.hunger@digia.com> |
fstab-generator: Small cleanup |
4f52d3fe2da7c3449b7fbfaa7c64a83354d3b56c |
|
29-Sep-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
fstab-generator: properly deal with discard as non-last option
Previous code would only return correct results when discard
was the last option.
While at it, avoid incorrect behaviour for (invalid) 'pri' option
not followed by '=...', and also do not return -1 as the error code. |
86b23b07c96b185126bfbf217227dad362a20c25 |
|
29-Sep-2014 |
Jan Synacek <jsynacek@redhat.com> |
swap: introduce Discard property
Process possible "discard" values from /etc/fstab. |
8085f163c50d998f3e30a6ddfc72c73d5dc57747 |
|
14-Aug-2014 |
Dave Reisner <dreisner@archlinux.org> |
util: allow strappenda to take any number of args
This makes strappenda3 redundant, so we remove its usage and
definition. Add a few tests along the way for sanity. |
126cc76074b763c7de9edec848fb86b22e8a78ef |
|
08-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
fstab-generator: fix trivial leak |
b3208b662948b51ff34e7b7752e28ec7a48708ae |
|
01-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
fstab-generator: allow x-systemd.device-timeout for swap units |
2968644080fd103062f070e83edd620e0a58c44d |
|
01-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Move x-systemd-device.timeout handling from core to fstab-generator
Instead of adjusting job timeouts in the core, let fstab-generator
write out a dropin snippet with the appropriate JobTimeout.
x-systemd-device.timeout option is removed from Options= line
in the generated unit.
The functions to write dropins are moved from core/unit.c to
shared/dropin.c, to make them available outside of core.
generator.c is moved to libsystemd-label, because it now uses
functions defined in dropin.c, which are in libsystemd-label. |
75a59316ea0d4bb9d04cce138817d9fa8a75479f |
|
24-Jun-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
fstab-generator: simplify add_root_mount |
8501384436b410cb9f5929ef6873c59fac6254be |
|
19-Jun-2014 |
Lennart Poettering <lennart@poettering.net> |
stop complaining about unknown kernel cmdline options
Also stop warning about unknown kernel cmdline options in the various
tools, not just in PID 1 |
689aede8c622ba68d9060e4edee27364445b2007 |
|
11-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
fstab-generator: when running in a container, ignore fstab entries referring to device nodes
Since these device nodes will never appear in the container anyway
there's no point in waiting for them.
This makes it easier to boot images generated with general purpose
installers like Anaconda which unconditionally populate /etc/fstab to
boot in containers. |
5ecdcf41cbce38c44b399993cb1c356280e0bafd |
|
07-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
fstab-generator: the root partition is not optional |
6db615c17ee7a434f9e0c40d67a1f833d8f3cc9d |
|
07-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
fstab-generator: merge /proc/cmdline parsing loops into one |
c3834f9b881f2b1a68dc7d797c134f0b66b47b57 |
|
06-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
generators: add Documentation= fields that point to the generator man pages |
059cb3858acd038ff2cef10a3a99119bf71a8fc6 |
|
06-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
util: move more intellegince into parse_proc_cmdline()
Already split variable assignments before invoking the callback. And
drop "rd." settings if we are not in an initrd. |
e48fdd84432bbf9c2ecc339183258c7c33116032 |
|
06-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
generators: rework mount generators
- Add support for finding and mounting /srv based on GPT data, similar
to how we already handly /home.
- Share the fsck logic between GPT, EFI and fstab generators
- Make sure we never run the EFI generator inside containers
- Drop DefaultDependencies=no from EFI mount units
- Other fixes |
141a79f491fd4bf5ea0d66039065c9f9649bfc0e |
|
17-Feb-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Extract looping over /proc/cmdline into a shared function
In cryptsetup-generator automatic cleanup had to be replaced
with manual cleanup, and the code gets a bit longer. But existing
code had the issue that it returned negative values from main(),
which was wrong, so should be reworked anyway. |
63a1b905d83b8d223f78822122c71860c1b613d1 |
|
10-Feb-2014 |
Colin Guthrie <colin@mageia.org> |
fstab-generator: Create fsck-root symlink with correct path
This was noticed in Brussels at the hackfest. The fstab-generator currently
creates a broken symlink pointing to itself in
/run/systemd/generator/local-fs.target.wants/ for systemd-fsck-root.service |
e2f123b97b9af34f39cb18ce0c1c5ef6cb89117e |
|
22-Dec-2013 |
Thomas Bächler <thomas@archlinux.org> |
fstab-generator: Do not try to fsck non-devices
This fixes a regression introduced in 64e70e4 where the mount fails
when fstab is misconfigured with fs_passno > 0 on a virtual file
system like nfs, and the type is specified as "auto". |
4e8da529592b01fee27f48962fe953b777de9b30 |
|
16-Nov-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
fstab-generator: use RequiresOverridable for fsck units
This allows the user to disable fsck's by masking.
If fsck fails, emergency target is started, the user might mount the
unit using mount and disable fsck by masking the unit. In this case,
.mount will be active because the mount is detect through
/proc/self/mountinfo, but systemd-fsck@.service will still be in
failed mode. This results in a funny situation where
$ systemctl show -p ActiveState local-fs.target yyy.mount
ActiveState=active
ActiveState=active
$ sudo systemctl start local-fs.target
[sudo] password for test:
Failed to start local-fs.target: Unit systemd-fsck@xxx.service is masked. |
94192cdaf652c9717f15274504ed315126c07a93 |
|
16-Nov-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
fsck,fstab-generator: be lenient about missing fsck.<type>
If fstab contains 1 for passno, treat this as an error, but only warn
briefly. If fstab doesn't contain this information, don't complain at
all.
Patch is complicated a bit by the fact that we might have the fstype specified
in fstab or on /proc/cmdline, in which case we can check if we have the appropriate
fsck tool, or not specified, or specified as auto, in which case we have to look
and check the type of the filesystem ourselves. It cannot be done before the
device appears, so it is too early in the generator phase, and it must be done
directly in fsck service. |
74df0fca09b3c31ed19e14ba80f996fdff772417 |
|
06-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
util: unify reading of /proc/cmdline
Instead of individually checking for containers in each user do this
once in a new call proc_cmdline() that read the file only if we are not
in a container. |
a7623afb7a48ab1d7b5b24fbd5f1033acfb2301c |
|
19-Oct-2013 |
Tom Gundersen <teg@jklm.no> |
fsck-root: only run when requested in fstab
fsck-root is redundant in case an initrd is used, or in case the rootfs
is never remounted 'rw', so the new default is the correct behavior for
most users. For the rest, they should enable it in fstab. |
64e70e4b86d3f732d3513189312f6220d1d5cfbc |
|
19-Oct-2013 |
Thomas Bächler <thomas@archlinux.org> |
fstab-generator: Generate explicit dependencies on systemd-fsck@.service instead of using FsckPassNo
[tomegun:
* order all fsck instances after fsck-root
* check for OOM
* added notes in the manpages] |
7f5806d7095a197e4788a7803642831beec295bf |
|
19-Oct-2013 |
Thomas Bächler <thomas@archlinux.org> |
fstab-generator: When parsing the root= cmdline option, set FsckPassNo to 1
[tomegun: without this we would never fsck the rootfs if it was directly
mounted 'rw' from the initrd. We now risk fsck'ing it twice in the case it
is mounted 'ro', so that should be addressed in a separate patch.] |
5862d652ba14178cff46b8a8fc6c6d8392bf32b1 |
|
04-Oct-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Introduce _cleanup_endmntent_ |
1dc2ced4646a78b3dee9e3ea44130f938d6425bc |
|
18-Sep-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Remove six unused variables and add annotation
clang FTW! |
4e82fe5213bedcb70e25c0270e516d5f2706d8c8 |
|
16-Sep-2013 |
Tom Gundersen <teg@jklm.no> |
swap: create .wants symlink to 'auto' swap devices
As we load unit files lazily, we need to make sure something pulls in swap
units that should be started automatically, otherwise the default dependencies
will never be applied.
This partially reinstates code removed in
commit 64347fc2b983f33e7efb0fd2bb44e133fb9f30f4.
Also don't order swap devices after swap.target when they are 'nofail'. |
64347fc2b983f33e7efb0fd2bb44e133fb9f30f4 |
|
11-Sep-2013 |
Tom Gundersen <teg@jklm.no> |
swap: handle nofail/noauto in core |
5073f89f102d98c27c4f3aefb5643b50a5301d10 |
|
11-Sep-2013 |
Tom Gundersen <teg@jklm.no> |
mount: move device links handling from generator
This makes mount units work like swap units: when the backing device appears
the mount unit will be started.
v2: the device should want the mount unconditionally, not only for DefaultDependencies=yes |
80c3b720bf3abbcc9427507d540e286c4ceb3e94 |
|
11-Sep-2013 |
Tom Gundersen <teg@jklm.no> |
fstab-generator: use DefaultDependencies=yes
This removes some redundancy between the generator and the core mount handling. |
01264ad1cc27ecaa059857429ed1b4f3994b26c3 |
|
15-Aug-2013 |
WANG Chao <chaowang@redhat.com> |
fstab-generator: log_oom() if automount_name is null |
ef53700c20b0fc51dbdedfb4a611fe6ca8411df9 |
|
09-Aug-2013 |
WANG Chao <chaowang@redhat.com> |
fstab-generator: read rd.fstab=on/off switch correctly |
21d1a6786326ad8996b6207eb20be01b056f1450 |
|
09-Aug-2013 |
WANG Chao <chaowang@redhat.com> |
fstab-generator: respect noauto/nofail when adding sysroot mount
Currently we don't respect noauto/nofail root mount options (from
rootflags kernel cmdline). We should map these two flags to the
corresponding boolean variable noauto and nofail when calling
add_mount(). |
7fd1b19bc9e9f5574f2877936b8ac267c7706947 |
|
18-Apr-2013 |
Harald Hoyer <harald@redhat.com> |
move _cleanup_ attribute in front of the type
http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html |
8333c77edf8fd1654cd96f3f6ee0f078dd64b58b |
|
29-Mar-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Always use errno > 0 to help gcc
gcc thinks that errno might be negative, and functions could return
something positive on error (-errno). Should not matter in practice,
but makes an -O4 build much quieter. |
0c17fbce55a9a2ca48318a918adce4c58ae79d98 |
|
29-Mar-2013 |
Lennart Poettering <lennart@poettering.net> |
unit: replace remote-fs-setup.target by network-online.target
https://bugzilla.redhat.com/show_bug.cgi?id=787314 |
a87586a17160f9a57fdc63604c48392cccb33454 |
|
26-Mar-2013 |
Harald Hoyer <harald@redhat.com> |
fstab-generator: drop x-initrd.rootfs mount option
x-initrd.mount now has different meanings, if fstab-generator is called
in the initramfs.
initrd:/etc/fstab and x-initrd.mount defines mounts for the
initrd-root-fs.target
initrd:/sysroot/etc/fstab and x-initrd.mount defines mounts for the
initrd-fs.target |
4e5ed9b69bb819d395e13da8ef033e17a0df8988 |
|
26-Mar-2013 |
Harald Hoyer <harald@redhat.com> |
fstab-generator: degrade the message about missing "root=" to log_debug
Some installation media (fedora at least) does not have and need a
"root=" argument on the kernel command line. |
e8d2f6cde0af86eece9118718ad0a8a19e1cffec |
|
25-Mar-2013 |
Lennart Poettering <lennart@poettering.net> |
units: introduce remote-fs-setup.target to pull in dependencies from remote mounts
This introduces remote-fs-setup.target independently of
remote-fs-pre.target. The former is only for pulling things in, the
latter only for ordering.
The new semantics:
remote-fs-setup.target: is pulled in automatically by all remote mounts.
Shall be used to pull in other units that want to run when at least one
remote mount is set up. Is not ordered against the actual mount units,
in order to allow activation of its dependencies even 'a posteriori',
i.e. when a mount is established outside of systemd and is only picked
up by it.
remote-fs-pre.target: needs to be pulled in automatically by the
implementing service, is otherwise not part of the initial transaction.
This is ordered before all remote mount units.
A service that wants to be pulled in and run before all remote mounts
should hence have:
a) WantedBy=remote-fs-setup.target -- so that it is pulled in
b) Wants=remote-fs-pre.target + Before=remote-fs-pre.target -- so that
it is ordered before the mount point, normally. |
1b036593b76614dd05942a78120c151161cccc0f |
|
25-Mar-2013 |
Mantas MikulÄ—nas <grawity@gmail.com> |
fstab-generator: add missing strempty() calls |
80c39ad27f5e99b1f18bdacd2b27a05ddee6cca1 |
|
25-Mar-2013 |
Lennart Poettering <lennart@poettering.net> |
fstab-generator: fix minor memory leak on error path |
df3e57f542cf680cd891dfbd85615885b54770dc |
|
25-Mar-2013 |
Lennart Poettering <lennart@poettering.net> |
fstab-generator: add missing OOM check |
790838e4f16831f2bb06aeb845b9e2fb0f1d28dd |
|
25-Mar-2013 |
Lennart Poettering <lennart@poettering.net> |
fstab-generator: rename x-initrd-rootfs.mount to x-initrd.rootfs
This changes the fstab mount option x-initrd-rootfs.mount to
x-initrd.rootfs, in order to only use a single namespace "x-initrd." for
all mount options of the initrd. |
9e5f0f92915b777308797294c6e103e430957b5d |
|
15-Mar-2013 |
Harald Hoyer <harald@redhat.com> |
Make initrd.target the default target in the initrd
First, rename root-fs.target to initrd-root-fs.target to clarify its usage.
Mount units with "x-initrd-rootfs.mount" are now ordered before
initrd-root-fs.target. As we sometimes construct /sysroot mounts in
/etc/fstab in the initrd, we want these to be mounted before the
initrd-root-fs.target is active.
initrd.target can be the default target in the initrd.
(normal startup)
:
:
v
basic.target
|
______________________/|
/ |
| sysroot.mount
| |
| v
| initrd-root-fs.target
| |
| v
| initrd-parse-etc.service
(custom initrd services) |
| v
| (sysroot-usr.mount and
| various mounts marked
| with fstab option
| x-initrd.mount)
| |
| v
| initrd-fs.target
| |
\______________________ |
\|
v
initrd.target
|
v
initrd-cleanup.service
isolates to
initrd-switch-root.target
|
v
______________________/|
/ |
| initrd-udevadm-cleanup-db.service
| |
(custom initrd services) |
| |
\______________________ |
\|
v
initrd-switch-root.target
|
v
initrd-switch-root.service
|
v
switch-root |
700e07ffd53083114e91bb4ba646ed26d0463f67 |
|
13-Mar-2013 |
Harald Hoyer <harald@redhat.com> |
add initrd-fs.target and root-fs.target
Instead of using local-fs*.target in the initrd, use root-fs.target for
sysroot.mount and initrd-fs.target for /sysroot/usr and friends.
Using local-fs.target would mean to carry over the activated
local-fs.target to the isolated initrd-switch-root.target and thus in
the real root. Having local-fs.target already active after
deserialization causes ordering problems with the real root services and
targets.
We better isolate to targets for initrd-switch-root.target, which are
only available in the initrd. |
ac4785b031451030aeb5cd46e94c7e8f43796dec |
|
05-Mar-2013 |
Harald Hoyer <harald@redhat.com> |
Revert "fstab-generator: place initrd /sysroot mounts in initrd-fs.target"
This reverts commit 8330847e949fc0c26b16910e5240eef1fe2c330a.
Conflicts:
src/fstab-generator/fstab-generator.c |
135b5212d4234f5b75c9b86c9f924047c8d07589 |
|
04-Mar-2013 |
Harald Hoyer <harald@redhat.com> |
fstab-generator: only handle block devices with root= kernel command line parameter
skip s.th. like root=nfs:... root=iscsi:... root=nbd:... |
8330847e949fc0c26b16910e5240eef1fe2c330a |
|
04-Mar-2013 |
Harald Hoyer <harald@redhat.com> |
fstab-generator: place initrd /sysroot mounts in initrd-fs.target
also do not overwrite /sysroot*.mount units already generated from fstab |
3d22d1ab57bf44c92e4d9ca95d9728105dd3fb0d |
|
01-Mar-2013 |
Tom Gundersen <teg@jklm.no> |
fstab-generator: initrd - mount selected entries from /sysroot/etc/fstab
We only mount "/usr" and entries marked with "x-initrd.mount".
This (together with the right unit files) is needed in the initramfs in order to
natively support mounting /usr (and friends) from the initramfs.
The way it is meant to work is:
* wait for sysroot.mount to be mounted
* do a daemon-reload to generate sysroot-usr.mount (++) from /sysroot/etc/fstab
* wait for sysroot-usr.mount to be mounted
* switch-root
Cc: Harald Hoyer <harald.hoyer@gmail.com>
Cc: Dave Reisner <d@falconindy.com> |
533740e16118147ca1c066d641654d975ab6e169 |
|
01-Mar-2013 |
Tom Gundersen <teg@jklm.no> |
fstab-generator: drop rootwait support
I originally added this to stay as compatible as possible with the kernel, but
as Lennart argued it is not really useful in the initramfs, so let's drop it (we
already don't support 'rootdealy'). |
945d1442ed5d6cf50b0d0a45fe482130f74f2997 |
|
01-Mar-2013 |
Harald Hoyer <harald@redhat.com> |
fstab-generator: set "ro" as default for sysroot.mount |
3fb5a0feb4bbbc670c212acc9e6fcfb46465cc2f |
|
01-Mar-2013 |
Harald Hoyer <harald@redhat.com> |
fstab-generator: fix commit 92094b7 |
92094b75fb8629492cddab1677a29830a7d96811 |
|
01-Mar-2013 |
Harald Hoyer <harald@redhat.com> |
fstab-generator: parse_new_root_from_proc_cmdline() don't use "defaults"
Don't use "defaults" as default option string.
"defaults,<anyotheroption>" does not
even work for the mount unit mount options. |
3f8ee7918207d7128d4edbc20a1e81f4c6e1110e |
|
01-Mar-2013 |
Frederic Crozat <fcrozat@suse.com> |
fstab,mount: detect rbind as bind mount
Correctly detect rbind mount option as bind mount.
Fixes https://bugzilla.novell.com/show_bug.cgi?id=804575. |
696164cb5b5c35a8c5ba4ee63d299d404bb48833 |
|
21-Feb-2013 |
Harald Hoyer <harald@redhat.com> |
fstab-generator: change kernel command line mount path for root
Use /sysroot instead of /new_root to mount the real root in the
initramfs. |
a5c32cff1f56afe6f0c6c70d91a88a7a8238b2d7 |
|
14-Feb-2013 |
Harald Hoyer <harald@redhat.com> |
honor SELinux labels, when creating and writing config files
Also split out some fileio functions to fileio.c and provide a SELinux
aware pendant in fileio-label.c
see https://bugzilla.redhat.com/show_bug.cgi?id=881577 |
b929bf049d33823dedb1ab2e2ac688cd341792fb |
|
09-Jan-2013 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
tabs to spaces
Skipped bootchart and various files that looked like they should be
kept in sync with external sources. |
d0aa9ce51915f6f7448adfeb4be0f46cc1356124 |
|
06-Jan-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
fstab-generator: modernize style |
6fe8ab6d57f24bcdbb18c8e40a3927090fbaeb0e |
|
29-Dec-2012 |
Tom Gundersen <teg@jklm.no> |
fstab-generator: fix typo |
5e398e546ea65751e6a774daf828fe06f74434a2 |
|
28-Dec-2012 |
Tom Gundersen <teg@jklm.no> |
fstab-generator: generate new_root.mount in initrd
The configuration is taken from /proc/cmdline, aiming at emulating the
behavior of the kernel when no initramfs is used.
The supported options are: root=, rootfstype=, rootwait=, rootflags=,
ro, and rw. rootdelay= was dropped, as it is not really useful in a
systemd world, but could easily be added.
v2: fix comments by Lennart, and complain loudly if root= can not be found
Cc: Harald Hoyer <harald@redhat.com>
Cc: Dave Reisner <dreisner@archlinux.org> |
f9ea108e7c3544c03822277a1112a48dc62f6ed4 |
|
24-Dec-2012 |
Lennart Poettering <lennart@poettering.net> |
fstab-generator: properly detect bind mounts
This kinda undoes a83cbaccd03c3f28e47e9330f4a22ff65ce4b561 and
1d634e21b453f3c80d7c6c4bd90a6b84e42a3d2a but corrects the original code
to compare the mount type with "bind" rather than the mount options. |
67ab5f761f9b854d8ce85f9ee47b298e497f8bd9 |
|
27-Nov-2012 |
Tom Gundersen <teg@jklm.no> |
fstab-generator: make error more helpful in case of duplicates in fstab
Traditional sysvinit systems would not complain about duplicates in
fstab. Rather it (through monut -a) would mount one fs on top of another,
in effect the last entry taking precedent.
In systemd, the first entry takes precedent, all subsequent ones are
ignored and an error is printed.
The change of behavior and the source of this error message was causing
some confusion, so give a hint what migt be wrong. |
1d634e21b453f3c80d7c6c4bd90a6b84e42a3d2a |
|
27-Nov-2012 |
Tom Gundersen <teg@jklm.no> |
fstab-generator: drop mount_is_bind
Do the check in-line instead, as the function is now a bit pointless. |
a83cbaccd03c3f28e47e9330f4a22ff65ce4b561 |
|
27-Nov-2012 |
Tom Gundersen <teg@jklm.no> |
fstab-generator: remove redundancy in mount_is_bind |
40b8acd039cf1ea00167017e63d9c0a773002f0e |
|
09-Nov-2012 |
Michal Schmidt <mschmidt@redhat.com> |
fstab-generator: more specific error messages |
0d0f0c50d3a1d90f03972a6abb82e6413daaa583 |
|
26-Jul-2012 |
Shawn Landden <shawnlandden@gmail.com> |
log.h: new log_oom() -> int -ENOMEM, use it
also a number of minor fixups and bug fixes: spelling, oom errors
that didn't print errors, not properly forwarding error codes,
few more consistency issues, et cetera |
669241a076108e0483d7d8475beaa506106d077e |
|
25-Jul-2012 |
Shawn Landden <shawnlandden@gmail.com> |
use "Out of memory." consistantly (or with "\n")
glibc/glib both use "out of memory" consistantly so maybe we should
consider that instead of this.
Eliminates one string out of a number of binaries. Also fixes extra newline
in udev/scsi_id |
b7def684941808600c344f0be7a2b9fcdda97e0f |
|
13-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
util: rename join() to strjoin()
This is to match strappend() and the other string related functions. |
9473414219330b9febc1d0712bbf49ad74cf962f |
|
22-Jun-2012 |
Lennart Poettering <lennart@poettering.net> |
fstab-generator: support fstab=/rd.fstab= kernel cmdline
This generalizes functionality already available in dracut. |
ec6ceb18663940efb1963704923430be0e83f1f7 |
|
04-Jun-2012 |
Kay Sievers <kay@vrfy.org> |
fstab-generator: avoid mangling of mount source string
This is a valid source entry in /etc/fstab:
//192.168.6.10/data /data cifs noperm,auto
On Mon, Jun 4, 2012 at 2:04 PM, Dave Reisner <d@falconindy.com> wrote:
> On Mon, Jun 04, 2012 at 12:57:47PM +0200, Kay Sievers wrote:
>>
>> Changed it to use:
>> path_is_absolute()
>> instead of:
>> is_path(),
>> so that we still sanitize the input we might match against.
>>
>> Let me know, if you think that could still cause any problems?
> Yes, this will still break CIFS shares. |
2b71016a3c3d4c088e8edd170fe6eb8431fd71fa |
|
04-Jun-2012 |
Kay Sievers <kay@vrfy.org> |
fstab-generator: avoid mangling of non-path mount source and dest
This can invalidate otherwise valid source paths with trailing slashes,
such as "host:/" in the case of a network mount.
Based on a patch from Dave Reisner <dreisner@archlinux.org>, which
removed the slash mangling entirely.
Changed it to match on the leading slash to exclude non-path values. |
d2e54fae5ca7a0f71b5ac8b356a589ff0a09ea0a |
|
31-May-2012 |
Kay Sievers <kay@vrfy.org> |
mkdir: append _label to all mkdir() calls that explicitly set the selinux context |
07719a21b6425d378b36bb8d7f47ad5ec5296d28 |
|
23-May-2012 |
Lennart Poettering <lennart@poettering.net> |
manager: rework generator logic
Previously generated units were always placed at the end of the search
path. With this change there will be three unit dirs instead of one, to
place generated entries at the beginning, in the middle and at the end
of the search path:
beginning: for units that need to override all configuration, regardless
of user or vendor. Example use: system-update-generator uses this to
temporarily redirect default.target.
middle: for units that need to override vendor configuration, but not
vendor configuration. Example use: /etc/fstab should override vendor
supplied configuration (think /tmp), but should not override native user
configuration.
end: does not override anything but is available as well. Possible usage
might be to convert D-Bus bus service files to native units but allowing
vendor supplied native units to win. |
1b64d026af01277e332d10d9e67e2eed5a4ded28 |
|
22-May-2012 |
Lennart Poettering <lennart@poettering.net> |
units: remove service sysv_path variable and replace it by generic unit_path
UnitPath= is also writable via native units and may be used by generators
to clarify from which file a unit is generated. This patch also hooks up
the cryptsetup and fstab generators to set UnitPath= accordingly. |
a6903061530cac5fbaa99a080a93221c02c349f9 |
|
22-May-2012 |
Lennart Poettering <lennart@poettering.net> |
log: make sure generators never log into the journal to avoid activation deadlocks
This makes all generators log to kmsg by default. |
6b1dc2bd3cdb3bd932b0692be636ddd2879edb92 |
|
22-May-2012 |
Lennart Poettering <lennart@poettering.net> |
mount: replace PID1 internal fstab parser with generator
Bit by bit we should remove non-unit parsing from PID 1 and move into
generators, to clean up our code base a bit and clearly separate
parsers. |