5 MODE="$2" # PRE-INSTALL, POST-INSTALL, DEINSTALL, POST-DEINSTALL
9 # install fsck tool and wrapper.
11 for i in e2fsck fsck_ext2fs ; do
12 ln -f ${PKG_PREFIX}/sbin/${i} /sbin 2>/dev/null \
13 || cp -p ${PKG_PREFIX}/sbin/${i} /sbin \
16 if test $err = 1 ; then
17 echo '========================================================================'
18 echo 'Warning: cannot install fsck to /sbin!'
19 echo 'Requesting ext2fs to be checked from /etc/fstab can cause boot failures!'
20 echo '========================================================================'
24 # install configuration file and update
26 if test -f ${PKG_PREFIX}/etc/mke2fs.conf; then
27 if cmp -s ${PKG_PREFIX}/etc/mke2fs.conf.dist \
28 ${PKG_PREFIX}/etc/mke2fs.conf; then
31 if grep -q ext4dev ${PKG_PREFIX}/etc/mke2fs.conf ; then
32 cp -f -p ${PKG_PREFIX}/etc/mke2fs.conf.dist \
33 ${PKG_PREFIX}/etc/mke2fs.conf.e2fsprogs-new
34 echo "==========================================================================="
35 echo "Warning: installing mke2fs.conf in ${PKG_PREFIX}/etc/mke2fs.conf.e2fsprogs-new"
36 echo "Check to see if you need to update your ${PKG_PREFIX}/etc/mke2fs.conf"
37 echo "==========================================================================="
39 mv ${PKG_PREFIX}/etc/mke2fs.conf \
40 ${PKG_PREFIX}/etc/mke2fs.conf.e2fsprogs-old
41 cp -f -p ${PKG_PREFIX}/etc/mke2fs.conf.dist \
42 ${PKG_PREFIX}/etc/mke2fs.conf
43 echo "==========================================================================="
44 echo "Your mke2fs.conf is too old. Backing up old version in"
45 echo "${PKG_PREFIX}/etc/mke2fs.conf.e2fsprogs-old. Please check to see"
46 echo "if you have any local customizations that you wish to preserve."
47 echo "==========================================================================="
52 cp -f -p ${PKG_PREFIX}/etc/mke2fs.conf.dist \
53 ${PKG_PREFIX}/etc/mke2fs.conf
57 rm -f /sbin/fsck_ext2fs /sbin/e2fsck \
58 || echo "Could not remove /sbin/fsck_ext2fs /sbin/e2fsck. Please remove manually."
59 if cmp -s ${PKG_PREFIX}/etc/mke2fs.conf \
60 ${PKG_PREFIX}/etc/mke2fs.conf.dist
62 rm -f ${PKG_PREFIX}/etc/mke2fs.conf
64 echo "If and only if you are deleting e2fsprogs forever,"
65 echo "remember to delete ${PKG_PREFIX}/etc/mke2fs.conf."
67 if test -f ${PKG_PREFIX}/etc/e2fsck.conf
69 echo "If and only if you are deleting e2fsprogs forever,"
70 echo "remember to delete ${PKG_PREFIX}/etc/e2fsck.conf."
73 PRE-INSTALL|POST-DEINSTALL)