From f9fa3796059ace718854adcae4ea655f5acac247 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Mon, 28 Sep 2015 12:32:47 -0300 Subject: fix and optimize conditionals in linux.install for all kernels --- kernels/linux-libre-grsec-knock/linux.install | 14 +++++--------- kernels/linux-libre-knock/linux.install | 14 +++++--------- kernels/linux-libre-lts-knock/linux.install | 14 +++++--------- kernels/linux-libre-rt/linux.install | 14 +++++--------- libre-testing/linux-libre-pck/linux.install | 14 +++++--------- libre-testing/linux-libre/linux.install | 14 +++++--------- libre/linux-libre-grsec/linux.install | 14 +++++--------- libre/linux-libre-lts/linux.install | 14 +++++--------- libre/linux-libre/linux.install | 14 +++++--------- 9 files changed, 45 insertions(+), 81 deletions(-) diff --git a/kernels/linux-libre-grsec-knock/linux.install b/kernels/linux-libre-grsec-knock/linux.install index 3ab31da58..bd40bcc5f 100644 --- a/kernels/linux-libre-grsec-knock/linux.install +++ b/kernels/linux-libre-grsec-knock/linux.install @@ -8,7 +8,7 @@ post_install () { # updating module dependencies echo ">>> Updating module dependencies. Please wait ..." depmod ${KERNEL_VERSION} - if [ "$(uname -m)" = "armv7h" ]; then + if [ "$(uname -m)" = "armv7l" ]; then echo ">>> NOTE: Using this kernel requires GRUB!" echo ">>> See the Migration Guide for instructions:" echo ">>> https://wiki.parabola.nu/Migration_from_Arch_ARM#GRUB" @@ -19,18 +19,14 @@ post_install () { } post_upgrade() { - if [ "$(uname -m)" = "armv7h" ]; then - # updating module dependencies - echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} - elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod ${KERNEL_VERSION} + if [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then if findmnt --fstab -uno SOURCE /boot &>/dev/null && ! mountpoint -q /boot; then echo "WARNING: /boot appears to be a separate partition but is not mounted." fi - # updating module dependencies - echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." mkinitcpio -p linux-libre${KERNEL_NAME} diff --git a/kernels/linux-libre-knock/linux.install b/kernels/linux-libre-knock/linux.install index 3ab31da58..bd40bcc5f 100644 --- a/kernels/linux-libre-knock/linux.install +++ b/kernels/linux-libre-knock/linux.install @@ -8,7 +8,7 @@ post_install () { # updating module dependencies echo ">>> Updating module dependencies. Please wait ..." depmod ${KERNEL_VERSION} - if [ "$(uname -m)" = "armv7h" ]; then + if [ "$(uname -m)" = "armv7l" ]; then echo ">>> NOTE: Using this kernel requires GRUB!" echo ">>> See the Migration Guide for instructions:" echo ">>> https://wiki.parabola.nu/Migration_from_Arch_ARM#GRUB" @@ -19,18 +19,14 @@ post_install () { } post_upgrade() { - if [ "$(uname -m)" = "armv7h" ]; then - # updating module dependencies - echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} - elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod ${KERNEL_VERSION} + if [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then if findmnt --fstab -uno SOURCE /boot &>/dev/null && ! mountpoint -q /boot; then echo "WARNING: /boot appears to be a separate partition but is not mounted." fi - # updating module dependencies - echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." mkinitcpio -p linux-libre${KERNEL_NAME} diff --git a/kernels/linux-libre-lts-knock/linux.install b/kernels/linux-libre-lts-knock/linux.install index 3ab31da58..bd40bcc5f 100644 --- a/kernels/linux-libre-lts-knock/linux.install +++ b/kernels/linux-libre-lts-knock/linux.install @@ -8,7 +8,7 @@ post_install () { # updating module dependencies echo ">>> Updating module dependencies. Please wait ..." depmod ${KERNEL_VERSION} - if [ "$(uname -m)" = "armv7h" ]; then + if [ "$(uname -m)" = "armv7l" ]; then echo ">>> NOTE: Using this kernel requires GRUB!" echo ">>> See the Migration Guide for instructions:" echo ">>> https://wiki.parabola.nu/Migration_from_Arch_ARM#GRUB" @@ -19,18 +19,14 @@ post_install () { } post_upgrade() { - if [ "$(uname -m)" = "armv7h" ]; then - # updating module dependencies - echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} - elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod ${KERNEL_VERSION} + if [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then if findmnt --fstab -uno SOURCE /boot &>/dev/null && ! mountpoint -q /boot; then echo "WARNING: /boot appears to be a separate partition but is not mounted." fi - # updating module dependencies - echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." mkinitcpio -p linux-libre${KERNEL_NAME} diff --git a/kernels/linux-libre-rt/linux.install b/kernels/linux-libre-rt/linux.install index 3ab31da58..bd40bcc5f 100644 --- a/kernels/linux-libre-rt/linux.install +++ b/kernels/linux-libre-rt/linux.install @@ -8,7 +8,7 @@ post_install () { # updating module dependencies echo ">>> Updating module dependencies. Please wait ..." depmod ${KERNEL_VERSION} - if [ "$(uname -m)" = "armv7h" ]; then + if [ "$(uname -m)" = "armv7l" ]; then echo ">>> NOTE: Using this kernel requires GRUB!" echo ">>> See the Migration Guide for instructions:" echo ">>> https://wiki.parabola.nu/Migration_from_Arch_ARM#GRUB" @@ -19,18 +19,14 @@ post_install () { } post_upgrade() { - if [ "$(uname -m)" = "armv7h" ]; then - # updating module dependencies - echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} - elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod ${KERNEL_VERSION} + if [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then if findmnt --fstab -uno SOURCE /boot &>/dev/null && ! mountpoint -q /boot; then echo "WARNING: /boot appears to be a separate partition but is not mounted." fi - # updating module dependencies - echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." mkinitcpio -p linux-libre${KERNEL_NAME} diff --git a/libre-testing/linux-libre-pck/linux.install b/libre-testing/linux-libre-pck/linux.install index 3ab31da58..bd40bcc5f 100644 --- a/libre-testing/linux-libre-pck/linux.install +++ b/libre-testing/linux-libre-pck/linux.install @@ -8,7 +8,7 @@ post_install () { # updating module dependencies echo ">>> Updating module dependencies. Please wait ..." depmod ${KERNEL_VERSION} - if [ "$(uname -m)" = "armv7h" ]; then + if [ "$(uname -m)" = "armv7l" ]; then echo ">>> NOTE: Using this kernel requires GRUB!" echo ">>> See the Migration Guide for instructions:" echo ">>> https://wiki.parabola.nu/Migration_from_Arch_ARM#GRUB" @@ -19,18 +19,14 @@ post_install () { } post_upgrade() { - if [ "$(uname -m)" = "armv7h" ]; then - # updating module dependencies - echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} - elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod ${KERNEL_VERSION} + if [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then if findmnt --fstab -uno SOURCE /boot &>/dev/null && ! mountpoint -q /boot; then echo "WARNING: /boot appears to be a separate partition but is not mounted." fi - # updating module dependencies - echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." mkinitcpio -p linux-libre${KERNEL_NAME} diff --git a/libre-testing/linux-libre/linux.install b/libre-testing/linux-libre/linux.install index 3ab31da58..bd40bcc5f 100644 --- a/libre-testing/linux-libre/linux.install +++ b/libre-testing/linux-libre/linux.install @@ -8,7 +8,7 @@ post_install () { # updating module dependencies echo ">>> Updating module dependencies. Please wait ..." depmod ${KERNEL_VERSION} - if [ "$(uname -m)" = "armv7h" ]; then + if [ "$(uname -m)" = "armv7l" ]; then echo ">>> NOTE: Using this kernel requires GRUB!" echo ">>> See the Migration Guide for instructions:" echo ">>> https://wiki.parabola.nu/Migration_from_Arch_ARM#GRUB" @@ -19,18 +19,14 @@ post_install () { } post_upgrade() { - if [ "$(uname -m)" = "armv7h" ]; then - # updating module dependencies - echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} - elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod ${KERNEL_VERSION} + if [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then if findmnt --fstab -uno SOURCE /boot &>/dev/null && ! mountpoint -q /boot; then echo "WARNING: /boot appears to be a separate partition but is not mounted." fi - # updating module dependencies - echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." mkinitcpio -p linux-libre${KERNEL_NAME} diff --git a/libre/linux-libre-grsec/linux.install b/libre/linux-libre-grsec/linux.install index 3ab31da58..bd40bcc5f 100644 --- a/libre/linux-libre-grsec/linux.install +++ b/libre/linux-libre-grsec/linux.install @@ -8,7 +8,7 @@ post_install () { # updating module dependencies echo ">>> Updating module dependencies. Please wait ..." depmod ${KERNEL_VERSION} - if [ "$(uname -m)" = "armv7h" ]; then + if [ "$(uname -m)" = "armv7l" ]; then echo ">>> NOTE: Using this kernel requires GRUB!" echo ">>> See the Migration Guide for instructions:" echo ">>> https://wiki.parabola.nu/Migration_from_Arch_ARM#GRUB" @@ -19,18 +19,14 @@ post_install () { } post_upgrade() { - if [ "$(uname -m)" = "armv7h" ]; then - # updating module dependencies - echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} - elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod ${KERNEL_VERSION} + if [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then if findmnt --fstab -uno SOURCE /boot &>/dev/null && ! mountpoint -q /boot; then echo "WARNING: /boot appears to be a separate partition but is not mounted." fi - # updating module dependencies - echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." mkinitcpio -p linux-libre${KERNEL_NAME} diff --git a/libre/linux-libre-lts/linux.install b/libre/linux-libre-lts/linux.install index 3ab31da58..bd40bcc5f 100644 --- a/libre/linux-libre-lts/linux.install +++ b/libre/linux-libre-lts/linux.install @@ -8,7 +8,7 @@ post_install () { # updating module dependencies echo ">>> Updating module dependencies. Please wait ..." depmod ${KERNEL_VERSION} - if [ "$(uname -m)" = "armv7h" ]; then + if [ "$(uname -m)" = "armv7l" ]; then echo ">>> NOTE: Using this kernel requires GRUB!" echo ">>> See the Migration Guide for instructions:" echo ">>> https://wiki.parabola.nu/Migration_from_Arch_ARM#GRUB" @@ -19,18 +19,14 @@ post_install () { } post_upgrade() { - if [ "$(uname -m)" = "armv7h" ]; then - # updating module dependencies - echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} - elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod ${KERNEL_VERSION} + if [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then if findmnt --fstab -uno SOURCE /boot &>/dev/null && ! mountpoint -q /boot; then echo "WARNING: /boot appears to be a separate partition but is not mounted." fi - # updating module dependencies - echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." mkinitcpio -p linux-libre${KERNEL_NAME} diff --git a/libre/linux-libre/linux.install b/libre/linux-libre/linux.install index 3ab31da58..bd40bcc5f 100644 --- a/libre/linux-libre/linux.install +++ b/libre/linux-libre/linux.install @@ -8,7 +8,7 @@ post_install () { # updating module dependencies echo ">>> Updating module dependencies. Please wait ..." depmod ${KERNEL_VERSION} - if [ "$(uname -m)" = "armv7h" ]; then + if [ "$(uname -m)" = "armv7l" ]; then echo ">>> NOTE: Using this kernel requires GRUB!" echo ">>> See the Migration Guide for instructions:" echo ">>> https://wiki.parabola.nu/Migration_from_Arch_ARM#GRUB" @@ -19,18 +19,14 @@ post_install () { } post_upgrade() { - if [ "$(uname -m)" = "armv7h" ]; then - # updating module dependencies - echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} - elif [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then + # updating module dependencies + echo ">>> Updating module dependencies. Please wait ..." + depmod ${KERNEL_VERSION} + if [ "$(uname -m)" = "x86_64" ] || [ "$(uname -m)" = "i686" ]; then if findmnt --fstab -uno SOURCE /boot &>/dev/null && ! mountpoint -q /boot; then echo "WARNING: /boot appears to be a separate partition but is not mounted." fi - # updating module dependencies - echo ">>> Updating module dependencies. Please wait ..." - depmod ${KERNEL_VERSION} echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..." mkinitcpio -p linux-libre${KERNEL_NAME} -- cgit v1.2.3