source: lliurex-up/trunk/fuentes/lliurex-up-core/usr/share/lliurex-up/commonScripts/alternative-update-initramfs @ 3158

Last change on this file since 3158 was 3158, checked in by kbut, 4 years ago

update scripts

  • Property svn:executable set to *
File size: 639 bytes
Line 
1#!/bin/bash
2ACTION="$1"
3case "$ACTION" in
4        preActions)
5                { dpkg-divert --list /usr/sbin/update-initramfs | grep -q lliurex-up ; } || dpkg-divert --quiet --add --divert /usr/sbin/update-initramfs.REAL --package lliurex-up --rename /usr/sbin/update-initramfs
6                if [ ! -L /usr/sbin/update-initramfs ]; then
7                        ln -s /usr/lib/lliurex-up/update-initramfs-alternative /usr/sbin/update-initramfs
8                fi
9        ;;
10        postActions)
11                rc=0
12                dpkg-divert --list /usr/sbin/update-initramfs | grep -q lliurex-up && rc=1
13                if [ "$rc" = "1" ]; then
14                        rm /usr/sbin/update-initramfs
15                        dpkg-divert --quiet --remove --rename /usr/sbin/update-initramfs
16                fi
17        ;;
18esac
Note: See TracBrowser for help on using the repository browser.