How do I run this from the bash shell? (from clients/inst_finish.ycp) SCR::Write (.target.string, "/var/lib/YaST2/runme_at_boot", "") I want to try running this manually so I can understand why it is failing during autoinstallation. This is failing for my target, as are a couple other SCR commands. I can run the command from a chroot post-script to get the help output with: chroot /mnt /usr/lib/YaST2/servers/scr -h So the command seems to run somewhat, but for the runme_at_boot creation I get the Y2log error: 2004-12-18 02:34:13 <0> linux(3172) [liby2] Y2ProgramComponent.cc(launchExternall Program):292 Going to execute /usr/lib/YaST2/servers/scr with chroot /mnt 2004-12-18 02:34:13 <0> linux(519) [libycp] Scanner.cc(Scanner):107 Scanner settting builtinTable to 0x507d10 2004-12-18 02:34:13 <0> linux(519) [libycp] Scanner.cc(initTables):146 m_globalTT able 0x1776bb0 2004-12-18 02:34:13 <0> linux(519) [libycp] Scanner.cc(initTables):158 m_localTaable 0x52fd60 2004-12-18 02:34:13 <0> linux(519) [libycp] parser.yy(yyparse):284 ------------------------------------------- accept ------------------------------ -------------- 2004-12-18 02:34:13 <0> linux(519) [liby2] Y2ProgramComponent.cc(sendToExternal)) :377 Error writing to external program /usr/lib/YaST2/servers/scr: Couldn't sendd (`Write (.target.string, "/var/lib/YaST2/runme_at_boot", "")) (Broken pipe) 2004-12-18 02:34:13 <3> linux(519) [liby2] Y2ProgramComponent.cc(receiveFromExtee rnal):343 External program /usr/lib/YaST2/servers/scr died unexpectedly 2004-12-18 02:34:13 <3> linux(519) [Interpreter] scr:240 SCR::Write() did not reeturn a boolean So I'd like to understand what is wrong with my target's environment that this would fail. thanks, Brian
Hello, Well we found a problem with SCR that was causing the broken pipe problems. Basically the problem was that a pipe was being made, then duplicated (dup2) to standard input (0), and the original one was closed. In my case the original one was already 0 so that was the end of that pipe 8-( and the end of the installation. I grepped the yast2-core code and this seems to be a problem in a few places: agent-system/src/ShellCommand.cc: dup2 (pipe1[1], 2); agent-system/src/ShellCommand.cc: dup2 (pipe2[1], 1); liby2/src/Y2ProgramComponent.cc: dup2(to_external[0], 0); // set reading end to stdin liby2/src/Y2ProgramComponent.cc: close(to_external[0]); // close reading end (dup2 has duplicated it) liby2/src/Y2ProgramComponent.cc: dup2(from_external[1], 1); // set writing end to stdout liby2/src/Y2ProgramComponent.cc: close(from_external[1]); // close writing end (dup2 has duplicated it) The fix is of course to only do a dup2 if the fd you have is not already the one you want. brian On Monday 20 December 2004 2:24 pm, Brian Corriveau wrote:
2004-12-18 02:34:13 <0> linux(519) [liby2] Y2ProgramComponent.cc(sendToExternal))
:377 Error writing to external program /usr/lib/YaST2/servers/scr: Couldn't
sendd (`Write (.target.string, "/var/lib/YaST2/runme_at_boot", "")) (Broken pipe) 2004-12-18 02:34:13 <3> linux(519) [liby2] Y2ProgramComponent.cc(receiveFromExtee rnal):343 External program /usr/lib/YaST2/servers/scr died unexpectedly 2004-12-18 02:34:13 <3> linux(519) [Interpreter] scr:240 SCR::Write() did not reeturn a boolean
participants (1)
-
Brian Corriveau