project-config/jenkins/scripts/lvm-kexec-reset.sh
Steve Kowalik e3060b094c Switch to using $() for subshells, part 2
Cleanup every use of `` for subshells in the jenkins/scripts
directory, replacing them with $(), and finally making the
scripts consistent.

Change-Id: Id3e45fb873c1ebeae6ab63a0caa4c427a7ccbb62
2015-06-04 15:33:48 +10:00

8 lines
278 B
Bash
Executable File

#!/bin/bash -x
lvremove -f /dev/main/last_root
lvrename /dev/main/root last_root
lvcreate -L20G -s -n root /dev/main/orig_root
APPEND="$(cat /proc/cmdline)"
kexec -l /vmlinuz --initrd=/initrd.img --append="$APPEND"
nohup bash -c "sleep 2; kexec -e" </dev/null >/dev/null 2>&1 &