Android Training Course (17)

Source: Internet
Author: User
Tags symlink

The main keywords recognized by the above functions are:

Copy capability chdir chroot class class_start class_stop console chown chmod critical disabled domainname device exec export group hostname

Ifup insmod import keycodes loglevel mkdir mount on oneshot onrestart restart service setenv setkey setprop setrlimit socket start stop

Symlink sysclktz trigger user write.

That is, the configuration file can only use the above keywords, and others are used as identifiers. These key functions are determined by pre-defined operations, as shown in the following code:

#001 # define KEYWORD (symbol, flags, nargs, func) K _ # symbol,

#002 enum {

#003 K_UNKNOWN,

#004 # endif

#005 KEYWORD (capability, OPTION, 0, 0)

This keyword is used to check the compatibility of the linux kernel before running the linux service. It is an option.

 

#006 KEYWORD (chdir, COMMAND, 1, do_chdir)

This keyword is used to change the current working directory. It is a command.

 

#007 KEYWORD (chroot, COMMAND, 1, do_chroot)

This keyword is used to change the root directory that a process can see. It restricts a process to a specified directory and ensures that the process can only take actions on the files in this directory and Its subdirectories, to ensure the security of the entire server, it is a command.

 

#008 KEYWORD (class, OPTION, 0, 0)

This keyword indicates a class name for a service. It is an option.

 

#009 KEYWORD (class_start, COMMAND, 1, do_class_start)

This keyword is used to start a service that is not running under a specified service class. It is a command.

 

#010 KEYWORD (class_stop, COMMAND, 1, do_class_stop)

This keyword is used to stop all running services under the specified service class. It is a command.

 

#011 KEYWORD (console, OPTION, 0, 0)

This keyword is the console option, which is an option.

 

#012 KEYWORD (critical, OPTION, 0, 0)

This keyword indicates that this is a key service for the device. If he exits more than four times in four minutes, the system will restart and enter the recovery mode.

 

#013 KEYWORD (disabled, OPTION, 0, 0)

This keyword indicates that this service cannot be automatically started with a trigger. It must be explicitly started by name ..

 

#014 KEYWORD (domainname, COMMAND, 1, do_domainname)

This keyword is set domain name, it is a command.

 

#015 KEYWORD (exec, COMMAND, 1, do_exec)

This keyword is used to create or execute a program. It is a command.

 

#016 KEYWORD (export, COMMAND, 2, do_export)

This keyword is used to set the value of the global environment variable. It is a command.

 

#017 KEYWORD (group, OPTION, 0, 0)

This keyword is used to change the group name of the service. It is an option.

 

#018 KEYWORD (hostname, COMMAND, 1, do_hostname)

This keyword is used for host name. It is a command.

 

#019 KEYWORD (ifup, COMMAND, 1, do_ifup)

This keyword is used to start the network interface. It is a command.

 

#020 KEYWORD (insmod, COMMAND, 1, do_insmod)

This keyword is used to load the module of the specified path. It is a command.

 

#021 KEYWORD (import, COMMAND, 1, do_import)

This keyword is used to load an rc file that init can recognize. It is a command.

 

#022 KEYWORD (keycodes, OPTION, 0, 0)

This keyword is used to define the key code option.

 

#023 KEYWORD (mkdir, COMMAND, 1, do_mkdir)

This keyword is used to create a directory. It is a command.

 

#024 KEYWORD (mount, COMMAND, 3, do_mount)

This keyword is used to specify a directory to load the device. It is a command.

 

#025 KEYWORD (on, SECTION, 0, 0)

This keyword is used to set the event for running a command. It is a segment descriptor.

 

#026 KEYWORD (oneshot, OPTION, 0, 0)

This keyword is used to set the server to close when it runs only once. It is an option.

 

#027 KEYWORD (onrestart, OPTION, 0, 0)

This keyword is used to set a command to be executed when the service is restarted. It is an option.

 

#028 KEYWORD (restart, COMMAND, 1, do_restart)

This keyword is used to restart the service. It is a command.

 

#029 KEYWORD (service, SECTION, 0, 0)

This keyword is used to set the command of a service. A service usually contains multiple options.

 

#030 KEYWORD (setenv, OPTION, 2, 0)

This keyword is used to set environment variables. It is an option.

 

#031 KEYWORD (setkey, COMMAND, 0, do_setkey)

This keyword is used to set the index and key value of a key. It is a command.

 

#032 KEYWORD (setprop, COMMAND, 2, do_setprop)

This keyword is used to set the system property name to a value. It is a command.

 

#033 KEYWORD (setrlimit, COMMAND, 3, do_setrlimit)

This keyword is used to set system resource limits. It is a command.

 

#034 KEYWORD (socket, OPTION, 0, 0)

This keyword is used to set the socket to an application. It is an option.

 

#035 KEYWORD (start, COMMAND, 1, do_start)

This keyword is used to start a service. It is a command.

 

#036 KEYWORD (stop, COMMAND, 1, do_stop)

This keyword is used to stop a service. It is a command.

 

#037 KEYWORD (trigger, COMMAND, 1, do_trigger)

This keyword is used to mark a trigger command, which is a command.

 

#038 KEYWORD (symlink, COMMAND, 1, do_symlink)

This keyword is used to set the symbolic connection of a path. It is a command.

 

#039 KEYWORD (sysclktz, COMMAND, 1, do_sysclktz)

This keyword is used to set the system clock benchmark. It is a command.

 

#040 KEYWORD (user, OPTION, 0, 0)

This keyword is used to set the user to which the service, file, or directory belongs. It is an option.

 

#041 KEYWORD (write, COMMAND, 2, do_write)

This keyword is used to open a file and write multiple strings. It is a command.

 

#042 KEYWORD (copy, COMMAND, 2, do_copy)

This keyword is used to copy files. It is a command.

 

#043 KEYWORD (chown, COMMAND, 2, do_chown)

This

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.