docu3
Create a file /usr/lib/YaST2/scrconf/*.scr, in our example we use ping.scr
------ ping.scr -------------------
.ping
`ag_ping ()
---------------------------------------------
Insert in the first line mount point (=path)
In the second line the you need a 'scriptname()
If you have a running YaST2 you have to restart it, then you
have access to your new script.
Lets test our script on the command line:
Rootlogin!
root@steiner:/usr/lib/YaST2/bin > ./y2base stdio scr
^^^^!
out: ([])
in: Execute(.ping, ["www.suse.de"])
out: ($["www.suse.de":" alive"])
Logfile /var/log/YaST2/y2log:
2001-02-01 17:29:01 <2> steiner(2622) [y2scr] ScriptingAgent.cc(RegisterAgent):92 Path '.xf86config' newly registered
2001-02-01 17:29:01 <0> steiner(2622) [liby2] Y2ComponentBroker.cc(createComponent):55 createComponent (ag_ping, Server)
2001-02-01 17:29:01 <0> steiner(2622) [liby2] Y2ComponentBroker.cc(createComponent):72 Component ag_ping created in level = 3, order = 3
2001-02-01 17:29:01 <0> steiner(2626) [liby2] Y2ProgramComponent.cc(launchExternalProgram):271 Going to execute /usr/lib/YaST2/servers_non_y2/ag_ping
2001-02-01 17:29:01 <0> --perl-- Now we check with ping the hosts: www.suse.de
2001-02-01 17:29:01 <0> --perl-- alive : Host www.suse.de