From: Michael Prokop Date: Wed, 4 Jul 2007 10:41:57 +0000 (+0200) Subject: /etc/zsh/zshrc: yse kexec alias only if /proc/cmdline can be read X-Git-Tag: 0.3.14 X-Git-Url: http://git.grml.org/?a=commitdiff_plain;h=refs%2Ftags%2F0.3.14;p=grml-etc-core.git /etc/zsh/zshrc: yse kexec alias only if /proc/cmdline can be read --- diff --git a/debian/changelog b/debian/changelog index 0b047a6..33c90f7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +grml-etc-core (0.3.14) unstable; urgency=low + + * /etc/zsh/zshrc: yse kexec alias only if /proc/cmdline can be read. + + -- Michael Prokop Wed, 04 Jul 2007 12:41:29 +0200 + grml-etc-core (0.3.13) unstable; urgency=low * /etc/zsh/zshrc: diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 3b6d6de..33b60ea 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -790,7 +790,7 @@ ${BLUE}%n${NO_COLOUR}@%m %40<...<%B%~%b%<< %# " alias ...='cd ../../' # generate alias named "$KERNELVERSION-reboot" so you can use boot with kexec: - if [ -x /sbin/kexec ] ; then + if [ -x /sbin/kexec -a -r /proc/cmdline ] ; then alias "$(uname -r)-reboot"="kexec -l --initrd=/boot/initrd.img-"$(uname -r)" --command-line=\"$(cat /proc/cmdline)\" /boot/vmlinuz-"$(uname -r)"" fi