Commit Graph
13179 Commits
Author SHA1 Message Date
Lennart Poettering 3c14d26c47 util: unify implementations of freeze() 2010-10-07 19:34:56 +02:00
Fabiano Fidencio b1b2a107d1 shutdown: Adding binary to shutdown the system
This functions are working as follows:
   - Send a SIGTERM to all processes that may be finished
   - Send a SIGKILL to all processes that still live and may be finished
   - Try to unmount all mount points
   - Try to remount read-only all mount points that can't be umounted
   - Umount all swap devices
   - Umount and detach all loopback devices
   - Call [poweroff|halt|reboot|kexec]

TODO:
   - Umount device-mapper.
   - Make log work. So far it is being useless as we do not parse
     /etc/systemd/system.conf, kernel command line but just
     environment, however we're executed by init and thus have no
     useful variables. Forcing it to target=kmsg/console and
     level=debug also does not produce any output, however writing to
     /dev/console does work (hack used during debug).
2010-10-07 19:23:46 +02:00
Fabiano Fidencio e347837975 umount: Adding unmount functions to be used in shutdown
This functions will:
   - umount all mount points that aren't API
   - remount read-only all mount points that can't be umounted
   - umount all swap devices.
   - detach all loopback devices

TODO:
   - umount dms

Mountpoints are being read from /proc/self/mountinfo.
Swaps are being read from /proc/swaps.
Loop devices from /sys/class/block/loop*.
2010-10-07 19:23:26 +02:00
Fabiano Fidencio 3846aeeba2 util: Adding a strneq, to represent (!strncmp(a, b, n))
As we have streq to repesent (strcmp(a, b) == 0),I'm adding
strneq to represent (strncmp(a, b, n) == 0), that will be used
in umount.c (at least).
2010-10-07 19:22:11 +02:00
Lennart Poettering b7f426649b sd-daemon: in some places sizeof(sa_family_t) actually does make sense 2010-10-07 19:01:26 +02:00
Lennart Poettering 0e098b15c7 util: never use sizeof(sa_family_t) when calculating sockaddr sizes 2010-10-07 02:34:17 +02:00
Lennart Poettering e983b76024 manager: notify plymouth about progress if it is running 2010-10-06 03:55:49 +02:00
Lennart Poettering 71fad67514 systemctl: require correctly formed unit names when enabling units 2010-10-06 02:33:40 +02:00
Matthias Schiffer 0b021426fb timer: Add missing break in switch 2010-10-05 23:28:13 +02:00
Fabiano Fidêncio 1ddff895f3 mount: Don't stop the mountinfo parser if one line can't be read
The current behavior of the /proc/self/mountinfo parser
is to stop the parser on parse failures

I'm only changing this behavior to try the next line and adding
a warning if occurs a fail.
2010-10-05 22:26:28 +02:00
Lennart Poettering 1bc5d57ae3 notify: fix include properly 2010-10-05 21:52:37 +02:00
Dave Reisner c899f8c61a fix typo: s/seperat/separat/g 2010-10-05 21:50:56 +02:00
Lennart Poettering 7607fea6a1 readahead: fix printf format string 2010-10-05 21:49:17 +02:00
Lennart Poettering f031e85fc0 notify: add missing include 2010-10-05 21:49:01 +02:00
Mike Kelly df37291a51 unit-name: fix unit name escaping
we want to do a bitwise shift, not a greater-than comparision
2010-10-05 21:23:30 +02:00
Lennart Poettering 525ee6f4a1 service: rename settings for Restart= from 'restart-always' to 'always' and similar 2010-10-05 20:30:44 +02:00
Lennart Poettering d0b4880988 sd-daemon: split off sd_readahead() since it is not a feature of systemd itself but of an auxiliary tool 2010-10-05 20:20:38 +02:00
Lennart Poettering a55da3cd5e mount: sort network mounts after network.target by default 2010-10-05 19:50:00 +02:00
Lennart Poettering f976f3f67c socket: make sockets to pass to a service configurable 2010-10-05 19:50:00 +02:00
Lennart Poettering d9ff321ad9 socket: make service to start on incoming traffic configurable 2010-10-05 19:50:00 +02:00
Lennart Poettering 0840ce2d49 readahead: ignore deleted files 2010-10-05 19:50:00 +02:00
Lennart Poettering 5b61848df2 readahead: minor 32bit fixes 2010-09-30 18:06:02 +02:00
Andreas Jaeger 010004791c tmpfiles: fix typo in comment 2010-09-29 10:08:24 +02:00
Lennart Poettering bdb0e14d27 readahead: preload pack file 2010-09-29 03:11:35 +02:00
Lennart Poettering 43be53513a readahead: make sure /dev/.systemd/readahead exists 2010-09-29 02:55:40 +02:00
Kay Sievers dd36de4d52 parse_env_file() - return empty value strings like FOO="" as NULL value 2010-09-28 23:41:09 +02:00
Lennart Poettering 7fcde28044 tmpfiles: move dir to /etc/tempfiles.d/ 2010-09-28 22:32:27 +02:00
Lennart Poettering 4aa8b15b0c tmpfiles: return sensible error code 2010-09-28 22:32:05 +02:00
Lennart Poettering bfaf42d22b tmpfiles: rename tempfiles to tmpfiles since this isn't windows 2010-09-28 22:11:27 +02:00
Fabiano Fidencio 95e26a692d list: Fixing typo in LIST_FIND_HEAD
Just removing a parenthesis
2010-09-28 21:57:34 +02:00
Lennart Poettering d9c7a87b35 readahead: ignore replay events when collecting 2010-09-28 21:46:30 +02:00
Lennart Poettering ee95669fb6 service: first lookup LSB facility names in tables, only then suppress self-provides 2010-09-28 21:08:39 +02:00
Lennart Poettering 55888fa400 readahead: fix SSD check 2010-09-28 20:53:08 +02:00
Matthias Schiffer 409db00299 service: Don't crash because of double free when Arch services are disabled in rc.conf 2010-09-28 19:41:04 +02:00
Lennart Poettering 0b5d26f95d service: filter out empty LSB description strings 2010-09-28 18:30:43 +02:00
Lennart Poettering a7d3cc26f9 service: when resolving sysv names drop leading $ 2010-09-28 18:30:43 +02:00
Kay Sievers 15917fb09b modules-load: use /etc/modules-load.d/?*.conf 2010-09-28 17:02:29 +02:00
Kay Sievers fd5bf055ac use .conf for new config files: locale, vconsole, modules.d 2010-09-28 11:51:24 +02:00
Kay Sievers 915d22e4f0 vconsole-setup: ignore empty strings like FOO="", imported from config files 2010-09-28 11:49:47 +02:00
Lennart Poettering 5008d5815a tempfiles: add little utility for creating volatile files/dirs in tmpfs hierarchies 2010-09-28 02:34:02 +02:00
Lennart Poettering 5c78d8e242 mount: properly handle bind mounts 2010-09-28 01:03:19 +02:00
Lennart Poettering caca31b576 service: shortcut sysv provides on ourselves 2010-09-28 00:29:09 +02:00
Lennart Poettering cb33e40000 service: ignore sysv $null service 2010-09-28 00:28:16 +02:00
Lennart Poettering b4a16b7b8a fix spelling of 'unneeded' at various places 2010-09-27 23:27:21 +02:00
Lennart Poettering 9f151f29fd service: don't create sysv order deps on merged units 2010-09-27 23:24:17 +02:00
Lennart Poettering 6ccb1b4429 load-fragment: reset fragment_path if we couldn't find a unit file for it 2010-09-27 20:31:57 +02:00
Lennart Poettering 2e7485f021 readahead: avoid collisions with the NULL pointer 2010-09-27 20:23:17 +02:00
Lennart Poettering aed5e44d50 Revert "hashmap: HASHMAP_FOREACH* iterate until ITERATOR_LAST"
This reverts commit 66d9b3b595.

If we check for i == ITERATOR_LAST we exit the loop one entry before the
end. Instead we should return if e is NULL.
2010-09-27 20:13:21 +02:00
Michael Biebl f6943caa53 Need to use #elif defined(DEBIAN) here...
This fixes a c&p error in 7472744bf9
2010-09-27 19:11:21 +02:00
Michael Biebl 7472744bf9 debian: add locale compat support
Read LANG from /etc/default/locale.
2010-09-27 18:40:51 +02:00