)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"0a4609e74a2c7286b610cab2f91c5046f9de05fe","unresolved":false,"context_lines":[{"line_number":10,"context_line":"TinyIPA."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I10cdb47eb3815db097bb3088d9dd4804b9d6a5d0"},{"line_number":13,"context_line":"Depends-On: I9b4c1278dc5fab7888fbfe586c15e31ed3958978"},{"line_number":14,"context_line":"Partial-Bug: #1526449"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"bf8cb3f7_a217b751","line":13,"updated":"2017-12-25 14:40:30.000000000","message":"I don\u0027t think this dependency is necessary. This IPA patch can be merged earlier than the agent interface patch.","commit_id":"91c8061e5032755a8238c210004d2a735be29661"}],"imagebuild/tinyipa/build_files/bootlocal.sh":[{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"c8b30a8ab8a7f528db5de80f4d6c12119aca935e","unresolved":false,"context_lines":[{"line_number":30,"context_line":"date"},{"line_number":31,"context_line":"ironic-python-agent 2\u003e\u00261 | tee /var/log/ironic-python-agent.log"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"# Create ipa-rescue-config directory for rescue password"},{"line_number":34,"context_line":"mkdir -p /etc/ipa-rescue-config"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"create_rescue_user(){"}],"source_content_type":"text/x-sh","patch_set":4,"id":"ff82abbf_8f205a4a","line":34,"range":{"start_line":33,"start_character":0,"end_line":34,"end_character":31},"updated":"2017-11-24 13:43:44.000000000","message":"We need to create this dir before running the agent, otherwise an error will happen when the agent try to write down the password file within the dir. Also, we need root privilege to execute this command.","commit_id":"21370f54d513f5ce170ce90bd5c2390d0a09d7ef"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"78a1474676a679b0880db3924dddd1351bba1388","unresolved":false,"context_lines":[{"line_number":30,"context_line":"date"},{"line_number":31,"context_line":"ironic-python-agent 2\u003e\u00261 | tee /var/log/ironic-python-agent.log"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"# Create ipa-rescue-config directory for rescue password"},{"line_number":34,"context_line":"mkdir -p /etc/ipa-rescue-config"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"create_rescue_user(){"}],"source_content_type":"text/x-sh","patch_set":4,"id":"ff82abbf_0505e213","line":34,"range":{"start_line":33,"start_character":0,"end_line":34,"end_character":31},"in_reply_to":"ff82abbf_8f205a4a","updated":"2017-11-27 21:56:58.000000000","message":"+1","commit_id":"21370f54d513f5ce170ce90bd5c2390d0a09d7ef"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"dda69254511ef19c41da8ecd6d50be55aa86c671","unresolved":false,"context_lines":[{"line_number":30,"context_line":"date"},{"line_number":31,"context_line":"ironic-python-agent 2\u003e\u00261 | tee /var/log/ironic-python-agent.log"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"# Create ipa-rescue-config directory for rescue password"},{"line_number":34,"context_line":"mkdir -p /etc/ipa-rescue-config"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"create_rescue_user(){"}],"source_content_type":"text/x-sh","patch_set":4,"id":"ff82abbf_bb41a0ab","line":34,"range":{"start_line":33,"start_character":0,"end_line":34,"end_character":31},"in_reply_to":"ff82abbf_8f205a4a","updated":"2017-11-28 18:43:14.000000000","message":"Thanks Dao, won\u0027t \u0027-p\u0027 be enough to create whatever parent directories are needed if not present? I agree that this might need root privilege.","commit_id":"21370f54d513f5ce170ce90bd5c2390d0a09d7ef"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"7928eab5bce9235704187d8771f265690738b958","unresolved":false,"context_lines":[{"line_number":30,"context_line":"date"},{"line_number":31,"context_line":"ironic-python-agent 2\u003e\u00261 | tee /var/log/ironic-python-agent.log"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"# Create ipa-rescue-config directory for rescue password"},{"line_number":34,"context_line":"mkdir -p /etc/ipa-rescue-config"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"create_rescue_user(){"}],"source_content_type":"text/x-sh","patch_set":4,"id":"ff82abbf_a5aaa86e","line":34,"range":{"start_line":33,"start_character":0,"end_line":34,"end_character":31},"in_reply_to":"ff82abbf_bb41a0ab","updated":"2017-11-30 10:16:15.000000000","message":"The directory creation is ok, but we need to move the creation to before the execution of ipa at line 31. When I used this patch to test rescue mode, ipa failed to create password file due to the lack of the directory.","commit_id":"21370f54d513f5ce170ce90bd5c2390d0a09d7ef"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"c8b30a8ab8a7f528db5de80f4d6c12119aca935e","unresolved":false,"context_lines":[{"line_number":34,"context_line":"mkdir -p /etc/ipa-rescue-config"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"create_rescue_user(){"},{"line_number":38,"context_line":"    crypted_pass\u003d$(\u003c/etc/ipa-rescue-config/ipa-rescue-password)"},{"line_number":39,"context_line":"    sudo adduser rescue -D -G root # no useradd"},{"line_number":40,"context_line":"    echo \"resc:$(openssl passwd -crypt ~/pass)\" | sudo chpasswd -e"}],"source_content_type":"text/x-sh","patch_set":4,"id":"ff82abbf_efd48622","line":37,"range":{"start_line":37,"start_character":20,"end_line":37,"end_character":21},"updated":"2017-11-24 13:43:44.000000000","message":"nit: s/{/ {/","commit_id":"21370f54d513f5ce170ce90bd5c2390d0a09d7ef"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"78a1474676a679b0880db3924dddd1351bba1388","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    if [ -f $pidfile ]; then"},{"line_number":53,"context_line":"        kill `cat $pidfile`"},{"line_number":54,"context_line":"    fi"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    /sbin/udhcpc -b -p -i ${interface} $pidfile -s /opt/udhcpc.script \u003e\u003e /var/log/udhcpc.log 2\u003e\u00261"},{"line_number":57,"context_line":"}"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-sh","patch_set":4,"id":"ff82abbf_f0199e79","line":55,"updated":"2017-11-27 21:56:58.000000000","message":"Would it make sense to have a pause here, since network plugging might not be immediate?","commit_id":"21370f54d513f5ce170ce90bd5c2390d0a09d7ef"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"dda69254511ef19c41da8ecd6d50be55aa86c671","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    if [ -f $pidfile ]; then"},{"line_number":53,"context_line":"        kill `cat $pidfile`"},{"line_number":54,"context_line":"    fi"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    /sbin/udhcpc -b -p -i ${interface} $pidfile -s /opt/udhcpc.script \u003e\u003e /var/log/udhcpc.log 2\u003e\u00261"},{"line_number":57,"context_line":"}"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-sh","patch_set":4,"id":"ff82abbf_bb2a00d8","line":55,"in_reply_to":"ff82abbf_f0199e79","updated":"2017-11-28 18:43:14.000000000","message":"Thanks Julia, I will take a note of this if pause is needed","commit_id":"21370f54d513f5ce170ce90bd5c2390d0a09d7ef"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"78a1474676a679b0880db3924dddd1351bba1388","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    create_rescue_user || exit 0"},{"line_number":61,"context_line":"    configure_dhcp_network || exit 0"},{"line_number":62,"context_line":"else"},{"line_number":63,"context_line":"    echo \"rescue password file is missing.\""},{"line_number":64,"context_line":"fi"}],"source_content_type":"text/x-sh","patch_set":4,"id":"ff82abbf_7054aefe","line":63,"range":{"start_line":63,"start_character":10,"end_line":63,"end_character":42},"updated":"2017-11-27 21:56:58.000000000","message":"Lets be a little more verbose \"IPA has exited. No rescue password defined\" ?","commit_id":"21370f54d513f5ce170ce90bd5c2390d0a09d7ef"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"dda69254511ef19c41da8ecd6d50be55aa86c671","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    create_rescue_user || exit 0"},{"line_number":61,"context_line":"    configure_dhcp_network || exit 0"},{"line_number":62,"context_line":"else"},{"line_number":63,"context_line":"    echo \"rescue password file is missing.\""},{"line_number":64,"context_line":"fi"}],"source_content_type":"text/x-sh","patch_set":4,"id":"ff82abbf_3b7cb0ea","line":63,"range":{"start_line":63,"start_character":10,"end_line":63,"end_character":42},"in_reply_to":"ff82abbf_7054aefe","updated":"2017-11-28 18:43:14.000000000","message":"Sure, I will update this.","commit_id":"21370f54d513f5ce170ce90bd5c2390d0a09d7ef"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"6240163a82fbc1958ce134228991867a6dac2dab","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    # NOTE(TheJulia): We may need to add a short wait here as"},{"line_number":57,"context_line":"    # network interace plugging actions may not be asynchronous."},{"line_number":58,"context_line":"    /sbin/udhcpc -b -p -i ${interface} $pidfile -s /opt/udhcpc.script \u003e\u003e /var/log/udhcpc.log 2\u003e\u00261"},{"line_number":59,"context_line":"}"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"if [ -f /etc/ipa-rescue-config/ipa-rescue-password ]; then"}],"source_content_type":"text/x-sh","patch_set":5,"id":"df87a7cf_019b9872","line":58,"updated":"2017-12-19 23:29:48.000000000","message":"This seems less than ideal, a single interface :\\","commit_id":"cce8fba38ebf83424a4164c69ec7ce23bf59ce6c"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"0b0f7c35d75d4ae9acd4f52e0a12731fdec61683","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    # NOTE(TheJulia): We may need to add a short wait here as"},{"line_number":57,"context_line":"    # network interace plugging actions may not be asynchronous."},{"line_number":58,"context_line":"    /sbin/udhcpc -b -p -i ${interface} $pidfile -s /opt/udhcpc.script \u003e\u003e /var/log/udhcpc.log 2\u003e\u00261"},{"line_number":59,"context_line":"}"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"if [ -f /etc/ipa-rescue-config/ipa-rescue-password ]; then"}],"source_content_type":"text/x-sh","patch_set":5,"id":"bf8cb3f7_914f78bc","line":58,"in_reply_to":"df87a7cf_019b9872","updated":"2017-12-22 10:26:04.000000000","message":"thanks for adding the loop for going over multiple interfaces","commit_id":"cce8fba38ebf83424a4164c69ec7ce23bf59ce6c"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"2988accd19e867e2f30f6bc655defb5e48401b39","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"create_rescue_user() {"},{"line_number":38,"context_line":"    crypted_pass\u003d$(\u003c/etc/ipa-rescue-config/ipa-rescue-password)"},{"line_number":39,"context_line":"    sudo adduser rescue -D -G root # no useradd"},{"line_number":40,"context_line":"    echo \"resc:$(openssl passwd -crypt ~/pass)\" | sudo chpasswd -e"},{"line_number":41,"context_line":"    sudo echo \"rescue ALL\u003d(ALL) NOPASSWD: ALL\" \u003e /etc/sudoers # no suooers.d in tiny core."}],"source_content_type":"text/x-sh","patch_set":6,"id":"bf8cb3f7_b9d5a1e7","line":38,"range":{"start_line":38,"start_character":17,"end_line":38,"end_character":63},"updated":"2017-12-26 13:43:05.000000000","message":"$(\u003c ...) works only with bash. $(cat ...) would be better here.","commit_id":"91c8061e5032755a8238c210004d2a735be29661"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"71f55eec970adc27fed14a83a210134c93b18d1b","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"create_rescue_user() {"},{"line_number":38,"context_line":"    crypted_pass\u003d$(\u003c/etc/ipa-rescue-config/ipa-rescue-password)"},{"line_number":39,"context_line":"    sudo adduser rescue -D -G root # no useradd"},{"line_number":40,"context_line":"    echo \"resc:$(openssl passwd -crypt ~/pass)\" | sudo chpasswd -e"},{"line_number":41,"context_line":"    sudo echo \"rescue ALL\u003d(ALL) NOPASSWD: ALL\" \u003e /etc/sudoers # no suooers.d in tiny core."}],"source_content_type":"text/x-sh","patch_set":6,"id":"9f91af0f_b196baef","line":38,"range":{"start_line":38,"start_character":17,"end_line":38,"end_character":63},"in_reply_to":"bf8cb3f7_b9d5a1e7","updated":"2018-01-09 12:31:31.000000000","message":"++","commit_id":"91c8061e5032755a8238c210004d2a735be29661"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"0a4609e74a2c7286b610cab2f91c5046f9de05fe","unresolved":false,"context_lines":[{"line_number":37,"context_line":"create_rescue_user() {"},{"line_number":38,"context_line":"    crypted_pass\u003d$(\u003c/etc/ipa-rescue-config/ipa-rescue-password)"},{"line_number":39,"context_line":"    sudo adduser rescue -D -G root # no useradd"},{"line_number":40,"context_line":"    echo \"resc:$(openssl passwd -crypt ~/pass)\" | sudo chpasswd -e"},{"line_number":41,"context_line":"    sudo echo \"rescue ALL\u003d(ALL) NOPASSWD: ALL\" \u003e /etc/sudoers # no suooers.d in tiny core."},{"line_number":42,"context_line":"}"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-sh","patch_set":6,"id":"bf8cb3f7_75572704","line":40,"range":{"start_line":40,"start_character":10,"end_line":40,"end_character":14},"updated":"2017-12-25 14:40:30.000000000","message":"This user name should be \u0027rescue\u0027.","commit_id":"91c8061e5032755a8238c210004d2a735be29661"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"7765eea5ce187e5e1bced83359c614d105eaf925","unresolved":false,"context_lines":[{"line_number":37,"context_line":"create_rescue_user() {"},{"line_number":38,"context_line":"    crypted_pass\u003d$(\u003c/etc/ipa-rescue-config/ipa-rescue-password)"},{"line_number":39,"context_line":"    sudo adduser rescue -D -G root # no useradd"},{"line_number":40,"context_line":"    echo \"resc:$(openssl passwd -crypt ~/pass)\" | sudo chpasswd -e"},{"line_number":41,"context_line":"    sudo echo \"rescue ALL\u003d(ALL) NOPASSWD: ALL\" \u003e /etc/sudoers # no suooers.d in tiny core."},{"line_number":42,"context_line":"}"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-sh","patch_set":6,"id":"9f91af0f_f1a8c220","line":40,"range":{"start_line":40,"start_character":10,"end_line":40,"end_character":14},"in_reply_to":"9f91af0f_3105ca46","updated":"2018-01-09 12:33:40.000000000","message":"Sorry, the code I tested was:\n\necho \"rescue:$crypted_pass\" | sudo chpasswd -e","commit_id":"91c8061e5032755a8238c210004d2a735be29661"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"2988accd19e867e2f30f6bc655defb5e48401b39","unresolved":false,"context_lines":[{"line_number":37,"context_line":"create_rescue_user() {"},{"line_number":38,"context_line":"    crypted_pass\u003d$(\u003c/etc/ipa-rescue-config/ipa-rescue-password)"},{"line_number":39,"context_line":"    sudo adduser rescue -D -G root # no useradd"},{"line_number":40,"context_line":"    echo \"resc:$(openssl passwd -crypt ~/pass)\" | sudo chpasswd -e"},{"line_number":41,"context_line":"    sudo echo \"rescue ALL\u003d(ALL) NOPASSWD: ALL\" \u003e /etc/sudoers # no suooers.d in tiny core."},{"line_number":42,"context_line":"}"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-sh","patch_set":6,"id":"bf8cb3f7_d08cfa80","line":40,"range":{"start_line":40,"start_character":10,"end_line":40,"end_character":14},"in_reply_to":"bf8cb3f7_75572704","updated":"2017-12-26 13:43:05.000000000","message":"Is this openssl command necessary? $crypted_pass seems already crypted[1].\n\nhttps://github.com/openstack/ironic-python-agent/blob/a659306272542dd38420cb118cc7b04b1e8cf377/ironic_python_agent/extensions/rescue.py#L45","commit_id":"91c8061e5032755a8238c210004d2a735be29661"},{"author":{"_account_id":18320,"name":"Dao Cong Tien","email":"tiendc@vn.fujitsu.com","username":"TienDC"},"change_message_id":"71f55eec970adc27fed14a83a210134c93b18d1b","unresolved":false,"context_lines":[{"line_number":37,"context_line":"create_rescue_user() {"},{"line_number":38,"context_line":"    crypted_pass\u003d$(\u003c/etc/ipa-rescue-config/ipa-rescue-password)"},{"line_number":39,"context_line":"    sudo adduser rescue -D -G root # no useradd"},{"line_number":40,"context_line":"    echo \"resc:$(openssl passwd -crypt ~/pass)\" | sudo chpasswd -e"},{"line_number":41,"context_line":"    sudo echo \"rescue ALL\u003d(ALL) NOPASSWD: ALL\" \u003e /etc/sudoers # no suooers.d in tiny core."},{"line_number":42,"context_line":"}"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-sh","patch_set":6,"id":"9f91af0f_3105ca46","line":40,"range":{"start_line":40,"start_character":10,"end_line":40,"end_character":14},"in_reply_to":"bf8cb3f7_d08cfa80","updated":"2018-01-09 12:31:31.000000000","message":"++\nThe below code worked when I tested:\n\necho \"rescue:$(crypted_pass)\" | sudo chpasswd -e","commit_id":"91c8061e5032755a8238c210004d2a735be29661"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"d0403a485f7f7f6ddc144b45e3b077c834d013e9","unresolved":false,"context_lines":[{"line_number":37,"context_line":"create_rescue_user() {"},{"line_number":38,"context_line":"    crypted_pass\u003d$(\u003c/etc/ipa-rescue-config/ipa-rescue-password)"},{"line_number":39,"context_line":"    sudo adduser rescue -D -G root # no useradd"},{"line_number":40,"context_line":"    echo \"resc:$(openssl passwd -crypt ~/pass)\" | sudo chpasswd -e"},{"line_number":41,"context_line":"    sudo echo \"rescue ALL\u003d(ALL) NOPASSWD: ALL\" \u003e /etc/sudoers # no suooers.d in tiny core."},{"line_number":42,"context_line":"}"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-sh","patch_set":6,"id":"7f96bb07_96cb0ba4","line":40,"range":{"start_line":40,"start_character":10,"end_line":40,"end_character":14},"in_reply_to":"bf8cb3f7_d08cfa80","updated":"2018-01-11 11:46:46.000000000","message":"Nice catch, Somehow for CoreOS we are again crypting the crypted_pass.","commit_id":"91c8061e5032755a8238c210004d2a735be29661"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"2988accd19e867e2f30f6bc655defb5e48401b39","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    crypted_pass\u003d$(\u003c/etc/ipa-rescue-config/ipa-rescue-password)"},{"line_number":39,"context_line":"    sudo adduser rescue -D -G root # no useradd"},{"line_number":40,"context_line":"    echo \"resc:$(openssl passwd -crypt ~/pass)\" | sudo chpasswd -e"},{"line_number":41,"context_line":"    sudo echo \"rescue ALL\u003d(ALL) NOPASSWD: ALL\" \u003e /etc/sudoers # no suooers.d in tiny core."},{"line_number":42,"context_line":"}"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"# Setup DHCP network"}],"source_content_type":"text/x-sh","patch_set":6,"id":"bf8cb3f7_8dd5ff45","line":41,"updated":"2017-12-26 13:43:05.000000000","message":"It would be better to use \"sh -c\" for writing to the file.\nAlso, \u0027s/\u003e/\u003e\u003e/\u0027 :\n  sudo sh -c \"echo \\\"rescue ALL\u003d(ALL) NOPASSWD: ALL\\\" \u003e\u003e /etc/sudoers\"","commit_id":"91c8061e5032755a8238c210004d2a735be29661"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"2988accd19e867e2f30f6bc655defb5e48401b39","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    sudo adduser rescue -D -G root # no useradd"},{"line_number":40,"context_line":"    echo \"resc:$(openssl passwd -crypt ~/pass)\" | sudo chpasswd -e"},{"line_number":41,"context_line":"    sudo echo \"rescue ALL\u003d(ALL) NOPASSWD: ALL\" \u003e /etc/sudoers # no suooers.d in tiny core."},{"line_number":42,"context_line":"}"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"# Setup DHCP network"},{"line_number":45,"context_line":"configure_dhcp_network() {"}],"source_content_type":"text/x-sh","patch_set":6,"id":"bf8cb3f7_537314b2","line":42,"updated":"2017-12-26 13:43:05.000000000","message":"Password authentication is disabled in TinyIPA. It is necessary to enable password authentication and to restart sshd.","commit_id":"91c8061e5032755a8238c210004d2a735be29661"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"2988accd19e867e2f30f6bc655defb5e48401b39","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    # network interface plugging actions may not be asynchronous."},{"line_number":52,"context_line":"    INTERFACES\u003d$(ip -o link |grep \"LOWER_UP\"|cut -f2 -d\" \"|sed \u0027s/://\u0027|grep -v \"lo\")"},{"line_number":53,"context_line":"    for interface in $INTERFACES; do"},{"line_number":54,"context_line":"        /sbin/udhcpc -b -p -i ${interface} $pidfile -s /opt/udhcpc.script \u003e\u003e /var/log/udhcpc.log 2\u003e\u00261"},{"line_number":55,"context_line":"    done"},{"line_number":56,"context_line":"}"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-sh","patch_set":6,"id":"bf8cb3f7_4db937e7","line":54,"updated":"2017-12-26 13:43:05.000000000","message":"pidfile should be defined because there may be no existing files and the files shouldn\u0027t be duplicated between interfaces:\n  pidfile\u003d\"/var/run/udhcpc/${interface}.pid\"\n\nIn the /sbin/udhcpc command, $pidfile should be just behind -p option.","commit_id":"91c8061e5032755a8238c210004d2a735be29661"},{"author":{"_account_id":18781,"name":"vinay muddu","email":"vinay50muddu@yahoo.com","username":"vmud213"},"change_message_id":"b26caa3cd44c55e28b2f69bf7ab78c37e3a3dade","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    # NOTE(TheJulia): We may need to add a short wait here as"},{"line_number":55,"context_line":"    # network interface plugging actions may not be asynchronous."},{"line_number":56,"context_line":"    INTERFACES\u003d$(ip -o link |grep \"LOWER_UP\"|cut -f2 -d\" \"|sed \u0027s/://\u0027|grep -v \"lo\")"},{"line_number":57,"context_line":"    for interface in $INTERFACES; do"},{"line_number":58,"context_line":"        pidfile\u003d\"/var/run/udhcpc/${interface}.pid\""},{"line_number":59,"context_line":"        /sbin/udhcpc -b -p ${pidfile} -i ${interface} -s /opt/udhcpc.script \u003e\u003e /var/log/udhcpc.log 2\u003e\u00261"}],"source_content_type":"text/x-sh","patch_set":7,"id":"9f91af0f_9cb60f8a","line":56,"range":{"start_line":56,"start_character":17,"end_line":56,"end_character":83},"updated":"2018-01-10 12:27:07.000000000","message":"just a suggestion as i see multiple pipes to parse. The same can be done as below with single sed.\nip -o link|sed -e \u0027/LOWER_UP/ !d\u0027 -e \u0027/lo/ d\u0027 -e \u0027s/[0-9]*:\\([^:]*\\)\\(.*\\)/\\1/g\u0027\n\nNot particular about the change. I am ok either ways.","commit_id":"abb03f9e690336e9d7415934366330924f0a3d65"},{"author":{"_account_id":18781,"name":"vinay muddu","email":"vinay50muddu@yahoo.com","username":"vmud213"},"change_message_id":"59bd14907dd6de2f043475ac3c8e676993184ece","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    # NOTE(TheJulia): We may need to add a short wait here as"},{"line_number":55,"context_line":"    # network interface plugging actions may not be asynchronous."},{"line_number":56,"context_line":"    INTERFACES\u003d$(ip -o link |grep \"LOWER_UP\"|cut -f2 -d\" \"|sed \u0027s/://\u0027|grep -v \"lo\")"},{"line_number":57,"context_line":"    for interface in $INTERFACES; do"},{"line_number":58,"context_line":"        pidfile\u003d\"/var/run/udhcpc/${interface}.pid\""},{"line_number":59,"context_line":"        /sbin/udhcpc -b -p ${pidfile} -i ${interface} -s /opt/udhcpc.script \u003e\u003e /var/log/udhcpc.log 2\u003e\u00261"}],"source_content_type":"text/x-sh","patch_set":7,"id":"7f96bb07_ccc02d54","line":56,"range":{"start_line":56,"start_character":17,"end_line":56,"end_character":83},"in_reply_to":"7f96bb07_1e52c268","updated":"2018-01-11 05:22:29.000000000","message":"Ah. I missed it could be minimal version of sed from Busybox. Nevertheless, i guess it should work as these are basic options. But u can comfortably ignore it if u think it\u0027s not worth for a try :)","commit_id":"abb03f9e690336e9d7415934366330924f0a3d65"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"119d15153232ed950a7d977c7339eaccb53b93b5","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    # NOTE(TheJulia): We may need to add a short wait here as"},{"line_number":55,"context_line":"    # network interface plugging actions may not be asynchronous."},{"line_number":56,"context_line":"    INTERFACES\u003d$(ip -o link |grep \"LOWER_UP\"|cut -f2 -d\" \"|sed \u0027s/://\u0027|grep -v \"lo\")"},{"line_number":57,"context_line":"    for interface in $INTERFACES; do"},{"line_number":58,"context_line":"        pidfile\u003d\"/var/run/udhcpc/${interface}.pid\""},{"line_number":59,"context_line":"        /sbin/udhcpc -b -p ${pidfile} -i ${interface} -s /opt/udhcpc.script \u003e\u003e /var/log/udhcpc.log 2\u003e\u00261"}],"source_content_type":"text/x-sh","patch_set":7,"id":"7f96bb07_1e52c268","line":56,"range":{"start_line":56,"start_character":17,"end_line":56,"end_character":83},"in_reply_to":"9f91af0f_9cb60f8a","updated":"2018-01-10 23:19:31.000000000","message":"I\u0027m not sure gnu sed is actually available, so it might be busybox sed which could behave a little differently.\n\nFor what it is worth, I was able to test it with multiple pipes in the busybox env.","commit_id":"abb03f9e690336e9d7415934366330924f0a3d65"},{"author":{"_account_id":18781,"name":"vinay muddu","email":"vinay50muddu@yahoo.com","username":"vmud213"},"change_message_id":"b26caa3cd44c55e28b2f69bf7ab78c37e3a3dade","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    done"},{"line_number":61,"context_line":"}"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"if [ -f /etc/ipa-rescue-config/ipa-rescue-password ]; then"},{"line_number":64,"context_line":"    create_rescue_user || exit 0"},{"line_number":65,"context_line":"    configure_dhcp_network || exit 0"},{"line_number":66,"context_line":"else"}],"source_content_type":"text/x-sh","patch_set":7,"id":"9f91af0f_395d9514","line":63,"range":{"start_line":63,"start_character":8,"end_line":63,"end_character":50},"updated":"2018-01-10 12:27:07.000000000","message":"When is this file created? I can see the directory is created @27 but not any files?","commit_id":"abb03f9e690336e9d7415934366330924f0a3d65"},{"author":{"_account_id":18781,"name":"vinay muddu","email":"vinay50muddu@yahoo.com","username":"vmud213"},"change_message_id":"59bd14907dd6de2f043475ac3c8e676993184ece","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    done"},{"line_number":61,"context_line":"}"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"if [ -f /etc/ipa-rescue-config/ipa-rescue-password ]; then"},{"line_number":64,"context_line":"    create_rescue_user || exit 0"},{"line_number":65,"context_line":"    configure_dhcp_network || exit 0"},{"line_number":66,"context_line":"else"}],"source_content_type":"text/x-sh","patch_set":7,"id":"7f96bb07_ecc40943","line":63,"range":{"start_line":63,"start_character":8,"end_line":63,"end_character":50},"in_reply_to":"7f96bb07_be4e2ebf","updated":"2018-01-11 05:22:29.000000000","message":"I got it.","commit_id":"abb03f9e690336e9d7415934366330924f0a3d65"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"119d15153232ed950a7d977c7339eaccb53b93b5","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    done"},{"line_number":61,"context_line":"}"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"if [ -f /etc/ipa-rescue-config/ipa-rescue-password ]; then"},{"line_number":64,"context_line":"    create_rescue_user || exit 0"},{"line_number":65,"context_line":"    configure_dhcp_network || exit 0"},{"line_number":66,"context_line":"else"}],"source_content_type":"text/x-sh","patch_set":7,"id":"7f96bb07_be4e2ebf","line":63,"range":{"start_line":63,"start_character":8,"end_line":63,"end_character":50},"in_reply_to":"9f91af0f_395d9514","updated":"2018-01-10 23:19:31.000000000","message":"IPA creates it before exiting.","commit_id":"abb03f9e690336e9d7415934366330924f0a3d65"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"95207c381b4619a9740991c8cca3793c97446acc","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    crypted_pass\u003d$(cat /etc/ipa-rescue-config/ipa-rescue-password)"},{"line_number":39,"context_line":"    sudo adduser rescue -D -G root # no useradd"},{"line_number":40,"context_line":"    echo \"rescue:$crypted_pass\" | sudo chpasswd -e"},{"line_number":41,"context_line":"    sudo sh -c \"echo \\\"rescue ALL\u003d(ALL) NOPASSWD: ALL\\\" \u003e\u003e /etc/sudoers\" # no suooers.d in tiny core."},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    # Restart sshd with allowing password authentication"},{"line_number":44,"context_line":"    sudo sed -i -e \u0027s/^PasswordAuthentication no/PasswordAuthentication yes/\u0027 /usr/local/etc/ssh/sshd_config"}],"source_content_type":"text/x-sh","patch_set":8,"id":"7f96bb07_251cc276","line":41,"updated":"2018-01-16 13:17:04.000000000","message":"nit: typo in \"sudoers.d\"","commit_id":"71c89c99fa1c66765c4d478fb9cffdf2503ab53d"}],"imagebuild/tinyipa/finalise-tinyipa.sh":[{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"2988accd19e867e2f30f6bc655defb5e48401b39","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    $TC_CHROOT_CMD tce-load -wic openssh"},{"line_number":96,"context_line":"    # Configure OpenSSH"},{"line_number":97,"context_line":"    $CHROOT_CMD cp /usr/local/etc/ssh/sshd_config.orig /usr/local/etc/ssh/sshd_config"},{"line_number":98,"context_line":"    echo \"PasswordAuthentication no\" | $CHROOT_CMD tee -a /usr/local/etc/ssh/sshd_config"},{"line_number":99,"context_line":"    # Generate and configure host keys - RSA, DSA, Ed25519"},{"line_number":100,"context_line":"    # NOTE(pas-ha) ECDSA host key will still be re-generated fresh on every image boot"},{"line_number":101,"context_line":"    $CHROOT_CMD ssh-keygen -t rsa -N \"\" -f /usr/local/etc/ssh/ssh_host_rsa_key"}],"source_content_type":"text/x-sh","patch_set":6,"id":"bf8cb3f7_b0c5b63e","line":98,"updated":"2017-12-26 13:43:05.000000000","message":"Password authentication is disabled here.","commit_id":"91c8061e5032755a8238c210004d2a735be29661"},{"author":{"_account_id":18781,"name":"vinay muddu","email":"vinay50muddu@yahoo.com","username":"vmud213"},"change_message_id":"b26caa3cd44c55e28b2f69bf7ab78c37e3a3dade","unresolved":false,"context_lines":[{"line_number":142,"context_line":"sudo cp \"$WORKDIR/build_files/bootlocal.sh\" \"$FINALDIR/opt/.\""},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"# Copy udhcpc.script to opt"},{"line_number":145,"context_line":"sudo cp \"$WORKDIR/udhcpc.script\" \"$FINALDIR/opt/.\""},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"# Disable ZSwap"},{"line_number":148,"context_line":"sudo sed -i \u0027/# Main/a NOZSWAP\u003d1\u0027 \"$FINALDIR/etc/init.d/tc-config\""}],"source_content_type":"text/x-sh","patch_set":7,"id":"9f91af0f_99338162","line":145,"range":{"start_line":145,"start_character":48,"end_line":145,"end_character":49},"updated":"2018-01-10 12:27:07.000000000","message":"nit:isn\u0027t needed i think :)","commit_id":"abb03f9e690336e9d7415934366330924f0a3d65"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"119d15153232ed950a7d977c7339eaccb53b93b5","unresolved":false,"context_lines":[{"line_number":142,"context_line":"sudo cp \"$WORKDIR/build_files/bootlocal.sh\" \"$FINALDIR/opt/.\""},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"# Copy udhcpc.script to opt"},{"line_number":145,"context_line":"sudo cp \"$WORKDIR/udhcpc.script\" \"$FINALDIR/opt/.\""},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"# Disable ZSwap"},{"line_number":148,"context_line":"sudo sed -i \u0027/# Main/a NOZSWAP\u003d1\u0027 \"$FINALDIR/etc/init.d/tc-config\""}],"source_content_type":"text/x-sh","patch_set":7,"id":"7f96bb07_9ecb321d","line":145,"range":{"start_line":145,"start_character":48,"end_line":145,"end_character":49},"in_reply_to":"9f91af0f_99338162","updated":"2018-01-10 23:19:31.000000000","message":"+1","commit_id":"abb03f9e690336e9d7415934366330924f0a3d65"}],"imagebuild/tinyipa/udhcpc.script":[{"author":{"_account_id":18781,"name":"vinay muddu","email":"vinay50muddu@yahoo.com","username":"vmud213"},"change_message_id":"388dca64197f0daeedf4f0163653582d893827f1","unresolved":false,"context_lines":[{"line_number":4,"context_line":""},{"line_number":5,"context_line":"# file created to be used for static network configuration as well"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"[ -z \"$1\" ] \u0026\u0026 echo \"Error: should be called from udhcpc\" \u0026\u0026 exit 1"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"RESOLV_CONF\u003d\"/etc/resolv.conf\""},{"line_number":10,"context_line":"[ -n \"$broadcast\" ] \u0026\u0026 BROADCAST\u003d\"broadcast $broadcast\""}],"source_content_type":"application/x-shellscript","patch_set":8,"id":"7f96bb07_d8a20e4c","line":7,"range":{"start_line":7,"start_character":27,"end_line":7,"end_character":28},"updated":"2018-01-22 06:40:29.000000000","message":"How About including the script name. Will be more verbose. Something like:\n\"Error: $0 should be called from udhcpc\"","commit_id":"71c89c99fa1c66765c4d478fb9cffdf2503ab53d"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"279c6686a749ec3a6913478693993d6367e11994","unresolved":false,"context_lines":[{"line_number":4,"context_line":""},{"line_number":5,"context_line":"# file created to be used for static network configuration as well"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"[ -z \"$1\" ] \u0026\u0026 echo \"Error: should be called from udhcpc\" \u0026\u0026 exit 1"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"RESOLV_CONF\u003d\"/etc/resolv.conf\""},{"line_number":10,"context_line":"[ -n \"$broadcast\" ] \u0026\u0026 BROADCAST\u003d\"broadcast $broadcast\""}],"source_content_type":"application/x-shellscript","patch_set":8,"id":"5f93b717_dee34a33","line":7,"range":{"start_line":7,"start_character":27,"end_line":7,"end_character":28},"in_reply_to":"5f93b717_3c9ea807","updated":"2018-01-31 18:35:08.000000000","message":"Not sure, if we should expose what file does get called here to user.","commit_id":"71c89c99fa1c66765c4d478fb9cffdf2503ab53d"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"97f5fd03c5228b93d06748ad0847983fdd97c847","unresolved":false,"context_lines":[{"line_number":4,"context_line":""},{"line_number":5,"context_line":"# file created to be used for static network configuration as well"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"[ -z \"$1\" ] \u0026\u0026 echo \"Error: should be called from udhcpc\" \u0026\u0026 exit 1"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"RESOLV_CONF\u003d\"/etc/resolv.conf\""},{"line_number":10,"context_line":"[ -n \"$broadcast\" ] \u0026\u0026 BROADCAST\u003d\"broadcast $broadcast\""}],"source_content_type":"application/x-shellscript","patch_set":8,"id":"5f93b717_3c9ea807","line":7,"range":{"start_line":7,"start_character":27,"end_line":7,"end_character":28},"in_reply_to":"7f96bb07_d8a20e4c","updated":"2018-01-24 21:27:22.000000000","message":"May be i can add a followup patch for addressing the nits","commit_id":"71c89c99fa1c66765c4d478fb9cffdf2503ab53d"},{"author":{"_account_id":18781,"name":"vinay muddu","email":"vinay50muddu@yahoo.com","username":"vmud213"},"change_message_id":"388dca64197f0daeedf4f0163653582d893827f1","unresolved":false,"context_lines":[{"line_number":37,"context_line":"                        echo adding dns $i"},{"line_number":38,"context_line":"                        echo nameserver $i \u003e\u003e $RESOLV_CONF"},{"line_number":39,"context_line":"                done"},{"line_number":40,"context_line":"                ;;"},{"line_number":41,"context_line":"esac"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"exit 0"}],"source_content_type":"application/x-shellscript","patch_set":8,"id":"7f96bb07_18c2b6ea","line":40,"range":{"start_line":40,"start_character":0,"end_line":40,"end_character":18},"updated":"2018-01-22 06:40:29.000000000","message":"nit: Don\u0027t we need to add default case and print the usage. My suggestion is to have a function usage:\nusage(){\necho \"Error: $1. Can not run the script $THIS_SCRIPT\"\n}. \nprovided THIS_SCRIPT is set in the begining.WDYT?","commit_id":"71c89c99fa1c66765c4d478fb9cffdf2503ab53d"}]}
