Sophie

Sophie

distrib > Mageia > 2 > i586 > by-pkgid > 583d97300c06f45aa0ac8c72954c8892 > scriptlet

dracut-017-16.mga2.noarch.rpm

POSTIN

/bin/sh
update-alternatives --install /sbin/mkinitrd mkinitrd /usr/bin/mkinitrd-dracut 110 || :
update-alternatives --install /sbin/lsinitrd lsinitrd /usr/bin/lsinitrd-dracut 110 || :

# (cg) Ensure that any resume swap partitions that are on LVM or raid are activated
if [ ! -f /etc/dracut.conf.d/51-mageia-resume.conf ]; then
  touch /etc/dracut.conf.d/51-mageia-resume.conf
  if grep -q " resume=" /proc/cmdline; then  
    dev="$(sed 's,.* resume=\([^ ]*\).*,\1,' /proc/cmdline)"
    if [ -n "$dev" ]; then
      echo "add_device+=\"$dev\"" >/etc/dracut.conf.d/51-mageia-resume.conf
    fi
  fi
fi

POSTUN

/bin/sh
[ ! -e /usr/bin/mkinitrd-dracut ] && update-alternatives --remove mkinitrd /usr/bin/mkinitrd-dracut || :
[ ! -e /usr/bin/lsinitrd-dracut ] && update-alternatives --remove lsinitrd /usr/bin/lsinitrd-dracut || :

POSTTRANS

/bin/sh
# (Anssi 12/2011) workaround recent broken postun which could've removed the
# alternatives - this can be removed in a few months or so since it was a
# cauldron-only issue
update-alternatives --install /sbin/mkinitrd mkinitrd /usr/bin/mkinitrd-dracut 110 || :
update-alternatives --install /sbin/lsinitrd lsinitrd /usr/bin/lsinitrd-dracut 110 || :