Running y2base Stand-Alone

This document (7005307) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 11
SUSE Linux Enterprise Server 10 Service Pack 3
SUSE Linux Enterprise Server 10 Service Pack 2

Situation

Is there a way to let runYCP-scripts isolated (i.e. stand-alone) in YaST?

Resolution

Normally YCP-scripts are executed involving the whole YaST-machinery, e.g. during installation, which requires correct embedding of the script into the surrounding YCP environment.

Fortunately there is a way to let runYCP-scripts isolated, i.e. stand-alone.

To do so we make use of the architectural separation of components featured by YaST. The “command line version” of YaST is called y2base and can usually be found in/usr/lib/YaST2/bin. You could set thePATH to include this location to avoid typing in the full path every time.

$> y2base -h

Usage: y2base [LogOpts] Client [ClientOpts] Server [Generic ServerOpts] [Specific ServerOpts]
LogOptions are:
-l | --logfile LogFile : Set logfile
ClientOptions are:
-s : Get options as one YCPList from stdin
-f FileName : Get YCPValue(s) from file
'(any YCPValue)' : Parameter _IS_ a YCPValue
Generic ServerOptions are:
-p FileName : Evaluate YCPValue(s) from file (preload)
'(any YCPValue)' : Parameter _IS_ a YCPValue to be evaluated
Specific ServerOptions are any options passed on unevaluated.

Examples:
y2base installation qt
Start binary y2base with intallation.ycp as client and qt as server
y2base installation '("test")' qt
Provide YCPValue '"test"' as parameter for client installation
y2base installation qt -geometry 800x600
Provide geometry information as specific server options

This help page, showing the possible options in a call ofy2base, is rather self-explaining.

Because a YCP-program (also called YCP-module) can act as a client-component, it is possible to connect it with a server-component suitable of executing it.

The user interface can be either a text-based console environment as well as a graphical X11 environment which leads to the following two methods of running aYCP-script.

  • y2base file.ycp qt

    This will execute file.ycp in the graphical Qt-UI.

  • y2base file.ycp ncurses

    This will execute file.ycp in the text-based NCurses-UI.


Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7005307
  • Creation Date: 05-Feb-2010
  • Modified Date:03-Mar-2020
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback@suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center