summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2014-02-19 22:08:08 (EST)
committer P. J. McDermott <pjm@nac.net>2014-02-19 22:08:08 (EST)
commit97e4306a0f4c690e2f17cdcf1c8c1dc1642b5881 (patch)
tree97cb2fa8d16b60b8be559b74bf6d9913c7db35fc
parent0c445507d6f714536ea1142b322ba8799a15e4fc (diff)
Manage /usr/bin/mkpasswd with update-alternatives.
This is also provided by busybox.
-rwxr-xr-xbuild1
-rw-r--r--expect-doc.pkg/files2
-rw-r--r--expect-doc.pkg/postinst6
-rw-r--r--expect-doc.pkg/prerm5
4 files changed, 13 insertions, 1 deletions
diff --git a/build b/build
index 08429f3..ea253d9 100755
--- a/build
+++ b/build
@@ -39,6 +39,7 @@ install: build
# Move pkgIndex.tcl.
mkdir -p dest/usr/share/tcltk
mv dest/usr/lib/$(OPK_HOST_ARCH)/expect$(V) dest/usr/share/tcltk
+ mv dest/usr/bin/mkpasswd dest/usr/bin/mkpasswd.expect
oh-fixperms
oh-strip
oh-installfiles
diff --git a/expect-doc.pkg/files b/expect-doc.pkg/files
index ab52a50..94acd44 100644
--- a/expect-doc.pkg/files
+++ b/expect-doc.pkg/files
@@ -6,7 +6,7 @@
/usr/bin/ftp-rfc
/usr/bin/kibitz
/usr/bin/lpunlock
-/usr/bin/mkpasswd
+/usr/bin/mkpasswd.expect
/usr/bin/multixterm
/usr/bin/passmass
/usr/bin/rftp
diff --git a/expect-doc.pkg/postinst b/expect-doc.pkg/postinst
new file mode 100644
index 0000000..e0cec59
--- /dev/null
+++ b/expect-doc.pkg/postinst
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+if [ "x${1}" = 'xconfigure' ]; then
+ update-alternatives --install /usr/bin/mkpasswd mkpasswd \
+ /usr/bin/mkpasswd.expect 10
+fi
diff --git a/expect-doc.pkg/prerm b/expect-doc.pkg/prerm
new file mode 100644
index 0000000..f67579a
--- /dev/null
+++ b/expect-doc.pkg/prerm
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+if [ "x${1}" = 'xremove' ]; then
+ update-alternatives --remove mkpasswd /usr/bin/mkpasswd.expect
+fi