summaryrefslogtreecommitdiffstats
path: root/shutdown
AgeCommit message (Collapse)AuthorFilesLines
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.