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