summaryrefslogtreecommitdiffstats
path: root/shutdown
AgeCommit message (Collapse)AuthorFilesLines
2012-11-12shutdown: fix awful typo in reading metadataDave Reisner1-1/+1
Reported-by: Jan Steffens <heftig@archlinux.org> Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-11-11shutdown: chdir to /sys/class/block earlier0.11.1Dave Reisner1-3/+3
This gives the loop detach logic an actual chance of working. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-11-11shutdown: simplify recursive disassembleDave Reisner1-6/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-11-11shutdown: pamper RAID devices with external metadataDave Reisner1-0/+8
Ensure that these devices (likely FakeRAID) are clean before stopping, to avoid leaving them in the dirty state and forcing a rebuild. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-08-13shutdown: add hack workaround for broken dm/kernelDave Reisner1-0/+4
This is already fixed elsewhere, and eventually this hack needs to be removed. However, for now, it seems that some kernels (3.4 and 3.0) will hang on shutdown with the combination of systemd and lvm/crypt. Removing evidence of udev being alive in /run seems to fix this. Fixes FS#30995. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-06-13shutdown: don't alert udev on disable VGsDave Reisner1-1/+1
Fixes FS#30271. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-05-18shutdown: package as 644, install as 755Dave Reisner1-0/+0
There's no need to keep this mildly dangerous script executable on the filesystem. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-02shutdown: detach all loop devices before umountingDave Reisner1-0/+6
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-02shutdown: refine umount_all logicDave Reisner1-3/+3
remove the mountpoint filtering from the awk processing and drop the -l flag from umount. Not clear why either of these were present -- they're both wrong. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-02shutdown: improve handling of dm devicesDave Reisner1-4/+8
- use the 'remove' action for cryptsetup rather than luksClose - handle dm devices with dmsetup, not lvm - disable dmraid devices by name, instead of all at once Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-03-26shutdown: disassemble devices on shutdownDave Reisner1-0/+64
sysfs contains enough information about block devices to be able to determine the order of stacked devices such as lvm, raid, or crypto. By looking at the device symlinks from the holders/ attributes of a block device, we can walk down each device chain until we reach the most descendant device. For each of these devices at the end of a chain, detect its type and perform the appropriate action to disassemble it. Then, walk back up the device chain, disassembling each parent device. To save ourselves some pain and make sure we're fairly accurate, lsblk is brought in for detection of device types. Thanks-To: Florian Pritz <bluewind@xinu.at> Thanks-To: Tom Gundersen <teg@jklm.no> Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-03-26shutdown: add vim modeline, fix whitespacingDave Reisner1-13/+15
Make this consistent with the rest of the codebase. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-01-28shutdown: make reboot the default actionDave Reisner1-5/+2
systemd passes 'kexec' on 'systemctl kexec' which isn't being caught. Catch the few possible verbs for a halt, and let everything else default to trying a kexec; falling back on a reboot. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-01-05shutdown: add new hook0.8.1Dave Reisner1-0/+29
This adds functionality to pivot to back to the initramfs on shutdown, thereby allowing the system to unmount the real root device. This will be necessary for anyone with /usr as a separate partition.