diff options
-rw-r--r-- | badblocks.pkg/postinst | 8 | ||||
-rw-r--r-- | badblocks.pkg/prerm | 8 | ||||
-rwxr-xr-x | build | 10 | ||||
-rw-r--r-- | e2fsprogs.pkg/postinst | 8 | ||||
-rw-r--r-- | e2fsprogs.pkg/prerm | 8 |
5 files changed, 42 insertions, 0 deletions
diff --git a/badblocks.pkg/postinst b/badblocks.pkg/postinst new file mode 100644 index 0000000..7565d24 --- /dev/null +++ b/badblocks.pkg/postinst @@ -0,0 +1,8 @@ +#!/bin/sh + +if [ x"${1}" = x'configure' ]; then + while read link; do + update-alternatives --install "${link}" "${link##*/}" \ + "${link}.e2p" 30 + done </usr/share/badblocks/alternatives +fi diff --git a/badblocks.pkg/prerm b/badblocks.pkg/prerm new file mode 100644 index 0000000..ba48cc5 --- /dev/null +++ b/badblocks.pkg/prerm @@ -0,0 +1,8 @@ +#!/bin/sh + +if [ x"${1}" = x'remove' ] || [ x"${1}" = x'purge' ] || [ x"${1}" = x'upgrade' ] +then + while read link; do + update-alternatives --remove "${link##*/}" "${link}.e2p" + done </usr/share/badblocks/alternatives +fi @@ -39,4 +39,14 @@ install: build oh-fixperms oh-strip oh-installfiles + # update-alternatives all the executables: + for d in badblocks.data e2fsprogs.data; do \ + mkdir -p "$${d}/usr/share/$${d%.data}/"; \ + exec 3>"$${d}/usr/share/$${d%.data}/alternatives"; \ + for f in $${d}/*bin/*; do \ + mv "$${f}" "$${f}.e2p"; \ + printf '%s\n' "$${f#*/}" 1>&3; \ + done; \ + exec 3>&-; \ + done oh-shlibdeps diff --git a/e2fsprogs.pkg/postinst b/e2fsprogs.pkg/postinst new file mode 100644 index 0000000..85752c7 --- /dev/null +++ b/e2fsprogs.pkg/postinst @@ -0,0 +1,8 @@ +#!/bin/sh + +if [ x"${1}" = x'configure' ]; then + while read link; do + update-alternatives --install "${link}" "${link##*/}" \ + "${link}.e2p" 30 + done </usr/share/e2fsprogs/alternatives +fi diff --git a/e2fsprogs.pkg/prerm b/e2fsprogs.pkg/prerm new file mode 100644 index 0000000..becf74c --- /dev/null +++ b/e2fsprogs.pkg/prerm @@ -0,0 +1,8 @@ +#!/bin/sh + +if [ x"${1}" = x'remove' ] || [ x"${1}" = x'purge' ] || [ x"${1}" = x'upgrade' ] +then + while read link; do + update-alternatives --remove "${link##*/}" "${link}.e2p" + done </usr/share/e2fsprogs/alternatives +fi |