Commit Graph

15 Commits

Author SHA1 Message Date
Tom Gundersen 67ab5f761f 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.
2012-11-27 01:57:57 +01:00
Tom Gundersen 1d634e21b4 fstab-generator: drop mount_is_bind
Do the check in-line instead, as the function is now a bit pointless.
2012-11-27 00:56:09 +01:00
Tom Gundersen a83cbaccd0 fstab-generator: remove redundancy in mount_is_bind 2012-11-27 00:41:43 +01:00
Michal Schmidt 40b8acd039 fstab-generator: more specific error messages 2012-11-09 12:00:46 +01:00
Shawn Landden 0d0f0c50d3 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
2012-07-26 11:48:26 +02:00
Shawn Landden 669241a076 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
2012-07-25 11:23:57 +02:00
Lennart Poettering b7def68494 util: rename join() to strjoin()
This is to match strappend() and the other string related functions.
2012-07-13 13:41:01 +02:00
Lennart Poettering 9473414219 fstab-generator: support fstab=/rd.fstab= kernel cmdline
This generalizes functionality already available in dracut.
2012-06-22 10:27:05 +02:00
Kay Sievers ec6ceb1866 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.
2012-06-04 15:21:05 +02:00
Kay Sievers 2b71016a3c 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.
2012-06-04 12:52:14 +02:00
Kay Sievers d2e54fae5c mkdir: append _label to all mkdir() calls that explicitly set the selinux context 2012-05-31 12:40:20 +02:00
Lennart Poettering 07719a21b6 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.
2012-05-23 03:43:29 +02:00
Lennart Poettering 1b64d026af 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.
2012-05-22 23:08:24 +02:00
Lennart Poettering a690306153 log: make sure generators never log into the journal to avoid activation deadlocks
This makes all generators log to kmsg by default.
2012-05-22 22:00:37 +02:00
Lennart Poettering 6b1dc2bd3c 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.
2012-05-22 19:25:17 +02:00