[Lunar-commits] <lunar> kernel.lunar: Updated backup_mods_krnl() to handle the new kernel file names
Stefan Wold
ratler at lunar-linux.org
Sat Jul 14 12:23:21 CEST 2012
Please disregard this diff. First of all it never went to the master
branch, it went to a branch named vmlinuz. It was never supposed to be put
in this repo at
all. My remote.ratler was for some reason not pointing where it should.
Our commit hook should not be sending mails from branches, so I will have
that bug fixed as well. But if we want that I could change it so that
subject says
<repo/branch>. Let me know :)
Sincerely
Stefan
On Sat, 14 Jul 2012, Stefan Wold wrote:
> commit f834d574dde7d5108e12ac690f1ef41360c58816
> Author: Stefan Wold <ratler at lunar-linux.org>
> Date: Sat, 14 Jul 2012 02:49:28 -0700
> URL: https://github.com/lunar-linux/lunar/commit/f834d574dde7d5108e12ac690f1ef41360c58816
>
> kernel.lunar: Updated backup_mods_krnl() to handle the new kernel file names
> ---
> libs/kernel.lunar +22/-17
> 1 files changed, 22 insertions (+), 17 deletions (-)
>
> --- a/libs/kernel.lunar
> +++ b/libs/kernel.lunar
> @@ -19,24 +19,29 @@
> # Arg 1 : Filename of the kernel to backup (With or without full path)
> # With the format $VERSION_$EXTRAVERSION
> backup_mods_krnl() {
> - debug_msg "backup_mods_krnl ($@)"
> + local ARCH=$(arch)
> + debug_msg "backup_mods_krnl ($@)"
>
> - devoke_installwatch
> + devoke_installwatch
>
> - if [ -f /boot/$1.old ]; then
> - verbose_msg "moving old kernel backup"
> - mv -f /boot/$1.old /boot/$1.old_2
> - fi
> - if [ -f /boot/$1 ]; then
> - verbose_msg "copying $1"
> - cp -p /boot/$1 /boot/$1.old
> - fi
> - if [ -d /lib/modules/$1 ]; then
> - rm -rf /lib/modules/$1.old
> - cp -a /lib/modules/$1 /lib/modules/$1.old
> - fi
> + if [ -f /boot/vmlinuz-$1-$ARCH ]; then
> + verbose_msg "copying vmlinuz-$1.$ARCH"
> + cp -p /boot/vmlinuz-$1-$ARCH{,.old}
> + fi
> + if [ -d /lib/modules/$1 ]; then
> + rm -rf /lib/modules/$1.old
> + cp -a /lib/modules/$1{,.old}
> + fi
> + if [ -f /boot/config-${1}-$ARCH.gz ]; then
> + verbose_msg "copying config-$1.$ARCH.gz"
> + cp -p /boot/config-${1}-$ARCH{,.old}.gz
> + fi
> + if [ -f /boot/System.map-${1}-$ARCH ]; then
> + verbose_msg "copying System.map-$1-$ARCH"
> + cp -p /boot/System.map-${1}-$ARCH{,.old}
> + fi
>
> - invoke_installwatch
> + invoke_installwatch
> }
>
>
> @@ -80,7 +85,7 @@ kernel_option_present() {
> CAT=cat
> ;;
> esac
> -
> +
> if [ -n "$KERNEL_VALUE" ]; then
> if $CAT "$KERNEL_CONFIG" | grep -Eq "^$KERNEL_OPTION=\"$KERNEL_VALUE\""; then
> return 0
> @@ -90,6 +95,6 @@ kernel_option_present() {
> return 0
> fi
> fi
> -
> +
> return 1
> }
>
>
> _______________________________________________
> Lunar-commits mailing list
> Lunar-commits at lunar-linux.org
> http://foo-projects.org/mailman/listinfo/lunar-commits
>
More information about the Lunar-dev
mailing list