]> git.ipfire.org Git - thirdparty/dracut.git/blame - dracut-initramfs-restore.sh
shutdown on demand
[thirdparty/dracut.git] / dracut-initramfs-restore.sh
CommitLineData
fb67e4aa
HH
1#!/bin/sh
2# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
3# ex: ts=8 sw=4 sts=4 et filetype=sh
4
5set -e
6cd /run/initramfs
7IMG="/boot/initramfs-$(uname -r).img"
8[ -f .need_shutdown -a -f "$IMG" ] || exit 1
9zcat "$IMG" | cpio -id >/dev/null 2>&1
10rm .need_shutdown