Magellan Linux

Contents of /tags/installer-simple-0_4_91_20160613_1/functions/initrd-tools.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2947 - (show annotations) (download) (as text)
Mon Jun 13 12:37:31 2016 UTC (8 years ago) by niro
File MIME type: application/x-sh
File size: 577 byte(s)
tagged 'installer-simple-0_4_91_20160613_1'
1 # select supported initrd-tools
2
3 is_initrd_supported()
4 {
5 # only generate initrds if the cmd exists, prefer dracut
6 [[ -x ${INSTALLROOT}/usr/bin/dracut ]] && return 0
7 [[ -x ${INSTALLROOT}/sbin/mkinitrd ]] && return 0
8 return 1
9 }
10
11 # prefer dracut
12 if [[ ${DEFAULT_INITRDTOOLS} = dracut ]] || [ -x ${INSTALLROOT}/usr/bin/dracut ]
13 then
14 echo "Using dracut" >&2
15 source ${INSTALLER_LIBDIR}/functions/dracut.sh
16 fi
17
18 if [[ ${DEFAULT_INITRDTOOLS} = mkinitrd ]] || [ -x ${INSTALLROOT}/sbin/mkinitrd ]
19 then
20 echo "Using mkinitrd" >&2
21 source ${INSTALLER_LIBDIR}/functions/mkinitrd.sh
22 fi