|
Functions |
| int | return_one (const struct dirent *entry) |
| const void | remove_directory (const string &path, int depth) |
| int | read_file_to_string (const char *filename, string &output) |
| YCPMap | stat2map (const struct stat &sb) |
| YCPMap | shellcommand_output (const string &script, const string &tempdir) |
| string | indent_output (int level) |
| string | dump_value (int level, const YCPValue &value) |
| return | YCPString (tempdir) |
| | if (arg.isNull()) |
| | if (arg->isString()) |
| else | if (arg->isList()&&(arg->asList()->size()==2)&&(arg->asList()->value(0)->isString())) |
| | if (path->length()!=2) |
| | if (value.isNull()||!value->isString()) |
| return | YCPBoolean (WIFEXITED(exitcode)&&WEXITSTATUS(exitcode)==0) |
| else | if (cmd=="string") |
| | ycp2error ("Undefined subpath for Write(%s)", path->toString().c_str()) |
| return | YCPBoolean (false) |
| | if (environment->isMap()) |
| | for (YCPMapIterator pos=variables->begin();pos!=variables->end();++pos) |
| | if (value.isNull()||arg.isNull()||!value->isString()||!arg->isString()) |
| | y2milestone ("symlink%s->%s", oldpath, newpath.c_str()) |
| | remove (newpath.c_str()) |
| return | YCPBoolean (symlink(oldpath, newpath.c_str())==0) |
| | if (!arg.isNull()) |
| | y2milestone ("mkdir%s", path.c_str()) |
| | while (pos=path.find('/', pos+1), pos!=string::npos) |
| | mkdir (path.substr(0, pos).c_str(), mode) |
| return | YCPBoolean (stat(path.c_str(),&sb)==0 &&S_ISDIR(sb.st_mode)) |
| | if (value.isNull()||!value->isList()) |
| | if (mountlist->size()< 2||!mountlist->value(0)->isString()||!mountlist->value(1)->isString()) |
| | if (mountlist->size()==3) |
| return | YCPBoolean (shellcommand(mountcmd)==0) |
| | if (!arg.isNull()&&arg->isString()) |
| return | YCPBoolean (shellcommand(umountcmd)==0) |
| return | YCPBoolean (ret==0) |
| return | YCPBoolean (shellcommand(insmodcmd)==0) |
| return | YCPBoolean (shellcommand(modprobecmd)==0) |
| | if (value.isNull()||!value->isInteger()) return YCPError("Bad PID in Execute(.kill |
| | if (!arg.isNull()&&arg->isInteger()) signal=arg->asInteger()->value() |
| return | YCPBoolean (kill(pid, signal)!=-1) |
| return | YCPError (string("Undefined subpath for Execute(")+path->toString()+")") |
Variables |
| YCPValue | default_value = YCPNull() |
| string | filename |
| string | passwd = value->asString()->value() |
| string | bashcommand |
| int | exitcode = system(bashcommand.c_str()) |
| YCPMap | variables |
| string | exports = "" |
| const char * | oldpath = value->asString()->value_cstr() |
| const string | newpath = arg->asString()->value() |
| string | path = value->asString()->value() |
| int | mode = 0755 |
| size_t | pos = 0 |
| stat | sb |
| YCPList | mountlist = value->asList() |
| string | mountcmd = "/bin/mount " |
| string | umountcmd = "/bin/umount " + value->asString()->value() |
| int | ret = unlink (value->asString ()->value_cstr ()) |
| string | insmodcmd = "/sbin/insmod " + value->asString()->value() |
| string | modprobecmd = "/sbin/modprobe " + value->asString()->value() |
| integer | pid = value->asInteger()->value() |
| integer integer | signal = 15 |