linux - How to read input while installing Debian package on Debian systems -
i have created small debian package has take input user , print out.
in order take input user "read" command on postinst scripts not work on debian systems don't know exact reason, worked in ubuntu systems.
later have figured out have use "debconf" debian systems using template file.
template file:
template: test/input type: text description: enter text, displayed postinst script:
db_get test/input echo "you have entered ::$ret" >&2 but when install test package error:
can't exec "postinst": no such file or directory @ /usr/share/perl/5.10/ipc/open3.pm line 168. <br>open2: exec of postinst configure failed @ /usr/share/perl5/debconf/confmodule.pm line 59
does know have done wrong?
your postinst script should following:
#!/bin/bash set -e . /usr/share/debconf/confmodule case "$1" in configure) db_get test/input echo "you have entered ::$ret" >&2 ;; esac db_stop
Comments
Post a Comment