Ubuntu 18.04.1 の preseed ファイルからこの bash ファイルを読み込んで実行しています。インストールは完全に機能し、bash ファイルがダウンロードされて実行されますが、エラーが発生します。
エラー メッセージ:「アクティベーション/アスクが存在しません」。これをトラブルシューティングしてdebconf dev構成を読み取ろうとしましたが、何が間違っているのかを実際に特定できません。何か案は?ありがとう
編集:インストール中にシェルに移動し、wget、この post.sh スクリプトを chmod すると、すべて正常に動作します。何か案は?
#!/bin/sh
# Library to interact with debconf.
. /usr/share/debconf/confmodule
# Create the template file
cat > /tmp/activate.template <<EOL
Template: activation/title
Type: text
Description: Activate
Template: activation/ask
Type: string
Description: Enter Activation Code
EOL
# Load your template
debconf-loadtemplate activation /tmp/activate.template
# Set title for dialogue box
db_settitle activation/title
# Input activation code
db_input critical activation/ask
db_go
# Fetch input from user
db_get activation/ask
# Save it to a file
echo "$RET" > /root/answer.value
#Error message: activation/ask does not exist
テンプレートの名前が変更されるため、そこでの不一致について心配する必要はありません。ありがとう