LSB

 

 


LSB(Linux Standard Base) Init Script

 

Ubuntu 16 (upstart 過渡 systemd)

/lib/systemd/systemd-sysv-install is a hook whose job is to do the non-native enable/disable actions

that systemd-sysv-generator and other service management systems will recognize.

Ubuntu's /lib/systemd/systemd-sysv-install simply calls Ubuntu's /usr/sbin/update-rc.d. That in turn calls /sbin/insserv.

That in turn sees that there's a van Smoorenbug rc script in /etc/init.d and tries to get LSB header information from it.

/etc/init.d/rsync

### BEGIN INIT INFO
# Provides:          rsyncd
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Should-Start:      $named autofs
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: fast remote file copy program daemon
# Description:       rsync is a program that allows files to be copied to and
#                    from remote machines in much the same way as rcp.
#                    This provides rsyncd daemon functionality.
### END INIT INFO

..

 


ABI & API

 

分別

  • ABI = application binary interface
  • API =

An ABI defines how data structures or computational routines are accessed in machine code,

which is a low-level, hardware-dependent format; ( job of a compiler)

ABIs cover details such as:

    a processor instruction set

    the binary format of object files, program libraries

    the calling convention, which controls how functions' arguments are passed and return values are retrieved;

In contrast, an API defines this access in source code, which is a relatively high-level, hardware-independent, often human-readable format.