[opensuse-ja] 自動インストール後の初期実行はうまくいかない場合がある
autoinstをテストしていましたが、インストール後、autoinst.xmlに 埋め込んだ初期実行スクリプトが動かない場合があることに気がつきました。 調べていったところ、初期実行スクリプトは、yast配下で動いているので、 何らかのテーブルがロックされてしまうことが分かりました。すなわち、 初期実行スクリプトの中で、リポジトリ追加 zypper ar が動きません。 なんか対応方法はないかな、と思案中です。 起動後に、ansible かなにかで設定しないと駄目かなあ。 ribbon -- To unsubscribe, e-mail: opensuse-ja+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-ja+owner@opensuse.org
武山です ファイルを事前に送り込める前提ですが… /etc/myfirstboot とかのファイルと、初期実行スクリプトを起動する service ファイルを作っておき スクリプトで ``` if [ -f /etc/myfirstboot ]; then 初回起動処理 rm /etc/myfirstboot # または service を削除 fi ``` という感じではダメでしょうか? 前にも一度書きましたが(2017/1/12)、SUSE Studio が使っている方法です。 On 2017/03/08 22:37, ribbon wrote:
autoinstをテストしていましたが、インストール後、autoinst.xmlに 埋め込んだ初期実行スクリプトが動かない場合があることに気がつきました。
調べていったところ、初期実行スクリプトは、yast配下で動いているので、 何らかのテーブルがロックされてしまうことが分かりました。すなわち、 初期実行スクリプトの中で、リポジトリ追加 zypper ar が動きません。
なんか対応方法はないかな、と思案中です。
起動後に、ansible かなにかで設定しないと駄目かなあ。
ribbon
-- To unsubscribe, e-mail: opensuse-ja+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-ja+owner@opensuse.org
On Thu, Mar 09, 2017 at 12:31:16AM +0900, Fuminobu TAKEYAMA wrote:
武山です
ファイルを事前に送り込める前提ですが…
/etc/myfirstboot とかのファイルと、初期実行スクリプトを起動する service +ファイルを作っておき
スクリプトで
``` if [ -f /etc/myfirstboot ]; then
初回起動処理
rm /etc/myfirstboot # または service を削除 fi ```
という感じではダメでしょうか? 前にも一度書きましたが(2017/1/12)、SUSE Studio が使っている方法です。
似た感じですが、autoinst.xml で、firstboot 機能を有効にすれば、 /usr/share/firstboot/scripts を実行してくれます。 ただ、このままだと、色々余計な設定が動き出すので、 /etc/YaST2/firstboot.xml を削除すると、今度は正常にインストールが終了しませんでした。 firstboot.xml はある程度ちゃんと書かないと駄目みたいです。 この線でもうちょっとがんばってみます。 ribbon -- To unsubscribe, e-mail: opensuse-ja+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-ja+owner@opensuse.org
On Thu, Mar 09, 2017 at 11:22:01PM +0900, User Ribbon wrote:
似た感じですが、autoinst.xml で、firstboot 機能を有効にすれば、 /usr/share/firstboot/scripts を実行してくれます。
ただ、このままだと、色々余計な設定が動き出すので、 /etc/YaST2/firstboot.xml を削除すると、今度は正常にインストールが終了しませんでした。 firstboot.xml はある程度ちゃんと書かないと駄目みたいです。
この線でもうちょっとがんばってみます。
マニュアルを読め!でした。 https://www.suse.com/documentation/sles-12/singlehtml/book_autoyast/book_aut... の4.30 Custom User Scripts post-install ではなくて、 init-install にすると、 サービス群が全部起動したあと、個別スクリプトを 実行してくれます。これで問題なし。 ribbon -- To unsubscribe, e-mail: opensuse-ja+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-ja+owner@opensuse.org
On Fri, Mar 10, 2017 at 08:26:13AM +0900, User Ribbon wrote:
マニュアルを読め!でした。
https://www.suse.com/documentation/sles-12/singlehtml/book_autoyast/book_aut...
の4.30 Custom User Scripts
post-install ではなくて、 init-install にすると、 サービス群が全部起動したあと、個別スクリプトを 実行してくれます。これで問題なし。
の話をblogに書きました。 http://blog.geeko.jp/ribbon/1501 ribbon -- To unsubscribe, e-mail: opensuse-ja+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-ja+owner@opensuse.org
participants (3)
-
Fuminobu TAKEYAMA
-
ribbon
-
User Ribbon