summaryrefslogtreecommitdiff
path: root/src/fstab-generator
AgeCommit message (Collapse)Author
2013-03-25units: introduce remote-fs-setup.target to pull in dependencies from remote ↵Lennart Poettering
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.
2013-03-25fstab-generator: add missing strempty() callsMantas Mikulėnas
2013-03-25fstab-generator: fix minor memory leak on error pathLennart Poettering
2013-03-25fstab-generator: add missing OOM checkLennart Poettering
2013-03-25fstab-generator: rename x-initrd-rootfs.mount to x-initrd.rootfsLennart Poettering
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.
2013-03-15Make initrd.target the default target in the initrdHarald Hoyer
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
2013-03-13add initrd-fs.target and root-fs.targetHarald Hoyer
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.
2013-03-05Revert "fstab-generator: place initrd /sysroot mounts in initrd-fs.target"Harald Hoyer
This reverts commit 8330847e949fc0c26b16910e5240eef1fe2c330a. Conflicts: src/fstab-generator/fstab-generator.c
2013-03-04fstab-generator: only handle block devices with root= kernel command line ↵Harald Hoyer
parameter skip s.th. like root=nfs:... root=iscsi:... root=nbd:...
2013-03-04fstab-generator: place initrd /sysroot mounts in initrd-fs.targetHarald Hoyer
also do not overwrite /sysroot*.mount units already generated from fstab
2013-03-01fstab-generator: initrd - mount selected entries from /sysroot/etc/fstabTom Gundersen
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>
2013-03-01fstab-generator: drop rootwait supportTom Gundersen
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').
2013-03-01fstab-generator: set "ro" as default for sysroot.mountHarald Hoyer
2013-03-01fstab-generator: fix commit 92094b7Harald Hoyer
2013-03-01fstab-generator: parse_new_root_from_proc_cmdline() don't use "defaults"Harald Hoyer
Don't use "defaults" as default option string. "defaults,<anyotheroption>" does not even work for the mount unit mount options.
2013-03-01fstab,mount: detect rbind as bind mountFrederic Crozat
Correctly detect rbind mount option as bind mount. Fixes https://bugzilla.novell.com/show_bug.cgi?id=804575.
2013-02-21fstab-generator: change kernel command line mount path for rootHarald Hoyer
Use /sysroot instead of /new_root to mount the real root in the initramfs.
2013-02-14honor SELinux labels, when creating and writing config filesHarald Hoyer
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
2013-01-09tabs to spacesThomas Hindoe Paaboel Andersen
Skipped bootchart and various files that looked like they should be kept in sync with external sources.
2013-01-06fstab-generator: modernize styleZbigniew Jędrzejewski-Szmek
2012-12-29fstab-generator: fix typoTom Gundersen
2012-12-28fstab-generator: generate new_root.mount in initrdTom Gundersen
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>
2012-12-24fstab-generator: properly detect bind mountsLennart Poettering
This kinda undoes a83cbaccd03c3f28e47e9330f4a22ff65ce4b561 and 1d634e21b453f3c80d7c6c4bd90a6b84e42a3d2a but corrects the original code to compare the mount type with "bind" rather than the mount options.
2012-11-27fstab-generator: make error more helpful in case of duplicates in fstabTom Gundersen
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.
2012-11-27fstab-generator: drop mount_is_bindTom Gundersen
Do the check in-line instead, as the function is now a bit pointless.
2012-11-27fstab-generator: remove redundancy in mount_is_bindTom Gundersen
2012-11-09fstab-generator: more specific error messagesMichal Schmidt
2012-07-26log.h: new log_oom() -> int -ENOMEM, use itShawn Landden
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
2012-07-25use "Out of memory." consistantly (or with "\n")Shawn Landden
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
2012-07-13util: rename join() to strjoin()Lennart Poettering
This is to match strappend() and the other string related functions.
2012-06-22fstab-generator: support fstab=/rd.fstab= kernel cmdlineLennart Poettering
This generalizes functionality already available in dracut.
2012-06-04fstab-generator: avoid mangling of mount source stringKay Sievers
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.
2012-06-04fstab-generator: avoid mangling of non-path mount source and destKay Sievers
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.
2012-05-31mkdir: append _label to all mkdir() calls that explicitly set the selinux ↵Kay Sievers
context
2012-05-23manager: rework generator logicLennart Poettering
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.
2012-05-22units: remove service sysv_path variable and replace it by generic unit_pathLennart Poettering
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.
2012-05-22log: make sure generators never log into the journal to avoid activation ↵Lennart Poettering
deadlocks This makes all generators log to kmsg by default.
2012-05-22mount: replace PID1 internal fstab parser with generatorLennart Poettering
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.