Compare commits
80 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8742607120 | ||
|
|
964ec9d4e0 | ||
|
|
b6ae63a236 | ||
|
|
0416fe454a | ||
|
|
20c9d97e24 | ||
|
|
ec8f6cfe9d | ||
|
|
51c148e09a | ||
|
|
9265ef89ff | ||
|
|
077aedde23 | ||
|
|
a9f82b1f8b | ||
|
|
c6e06dfa93 | ||
|
|
401d71c2dd | ||
|
|
21d50f27d8 | ||
|
|
e97f78ee11 | ||
|
|
228f0b99ca | ||
|
|
22f024fe8f | ||
|
|
1e7567a997 | ||
|
|
70c762072d | ||
|
|
23c0caf214 | ||
|
|
839094df0e | ||
|
|
16ba942afd | ||
|
|
47ae79aed0 | ||
|
|
a3d39214b7 | ||
|
|
5c9389dae3 | ||
|
|
b0c1d64d62 | ||
|
|
3ff4f0f706 | ||
|
|
a4f409641a | ||
|
|
995ebbe3d5 | ||
|
|
4c0ec1e599 | ||
|
|
7bb8f0969d | ||
|
|
2c71ec5529 | ||
|
|
9cfd315337 | ||
|
|
28601d814f | ||
|
|
930e82e5fe | ||
|
|
9693935bdd | ||
|
|
6884c8f9c6 | ||
|
|
4c1b2befd0 | ||
|
|
a2c60f407a | ||
|
|
59ce8ad415 | ||
|
|
bd94a2cb97 | ||
|
|
b561c6bce9 | ||
|
|
fa1277d1cd | ||
|
|
4c073b0c04 | ||
|
|
7874a102a5 | ||
|
|
0a4b6c49d3 | ||
|
|
bf7b281cdb | ||
|
|
f0b29ad130 | ||
|
|
7769000ba6 | ||
|
|
a73c16aac0 | ||
|
|
16be18350c | ||
|
|
a1633c271d | ||
|
|
0e793b05e2 | ||
|
|
2e1f7394f1 | ||
|
|
a08af4c52b | ||
|
|
b03e616f0d | ||
|
|
fe443ac8ca | ||
|
|
378eb3642c | ||
|
|
63d64ad4e6 | ||
|
|
f74f3c8520 | ||
|
|
921f8d0df8 | ||
|
|
de5da7fce7 | ||
|
|
bd1b86eecd | ||
|
|
ff523bc3da | ||
|
|
6fd29c5c85 | ||
|
|
5cb70eb684 | ||
|
|
b004b3725a | ||
|
|
35801910e7 | ||
|
|
f3066147a1 | ||
|
|
cd22a2c250 | ||
|
|
4121a9a37b | ||
|
|
a434645e76 | ||
|
|
bf39be20e4 | ||
|
|
9fc054586d | ||
|
|
070e15e4c0 | ||
|
|
a86323e90b | ||
|
|
3eb93907de | ||
|
|
dbf78305d4 | ||
|
|
26de1dd6f4 | ||
|
|
a2ec338fa6 | ||
|
|
1513dd0fa4 |
28
Makefile
28
Makefile
@ -1,4 +1,8 @@
|
|||||||
SRC = systemd.el systemd-company.el
|
SRC = systemd.el
|
||||||
|
DATA = unit-directives.txt network-directives.txt nspawn-directives.txt
|
||||||
|
DISTFILES := Makefile $(SRC) $(DATA) LICENSE README systemd-pkg.el test
|
||||||
|
|
||||||
|
VERSION := $(shell awk '/^;; Version:/ {print $$3}' $(SRC))
|
||||||
|
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
datarootdir := $(PREFIX)/share
|
datarootdir := $(PREFIX)/share
|
||||||
@ -8,14 +12,32 @@ EMACS = emacs
|
|||||||
|
|
||||||
all: $(SRC:.el=.elc)
|
all: $(SRC:.el=.elc)
|
||||||
|
|
||||||
|
systemd-pkg.el: $(SRC)
|
||||||
|
printf "(define-package \"systemd\" \"%s\" " $(VERSION) > $@
|
||||||
|
echo "\"Major mode for editing systemd units\")" >> $@
|
||||||
|
|
||||||
|
systemd.elc: $(DATA)
|
||||||
|
|
||||||
|
check: test/systemd-tests.el systemd.elc
|
||||||
|
@$(EMACS) -Q --batch -L . --eval "(progn \
|
||||||
|
(load-file \"test/systemd-tests.el\") \
|
||||||
|
(ert-run-tests-batch-and-exit))"
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(SRC:.el=.elc)
|
$(RM) $(SRC:.el=.elc) systemd-pkg.el
|
||||||
|
|
||||||
|
dist: clean systemd-pkg.el
|
||||||
|
mkdir systemd-$(VERSION)
|
||||||
|
cp -r $(DISTFILES) systemd-$(VERSION)
|
||||||
|
tar cf systemd-$(VERSION).tar systemd-$(VERSION)
|
||||||
|
rm -rf systemd-$(VERSION)
|
||||||
|
|
||||||
install:
|
install:
|
||||||
install -d $(DESTDIR)$(emacsdir)/systemd
|
install -d $(DESTDIR)$(emacsdir)/systemd
|
||||||
install -m644 $(SRC) $(SRC:.el=.elc) -t $(DESTDIR)$(emacsdir)/systemd
|
install -m644 $(SRC) $(SRC:.el=.elc) -t $(DESTDIR)$(emacsdir)/systemd
|
||||||
|
install -m644 $(DATA) -t $(DESTDIR)$(emacsdir)/systemd
|
||||||
|
|
||||||
.el.elc:
|
.el.elc:
|
||||||
$(EMACS) -L . --batch -f batch-byte-compile $<
|
$(EMACS) -L . --batch -f batch-byte-compile $<
|
||||||
|
|
||||||
.PHONY: all clean install
|
.PHONY: all check clean dist install
|
||||||
|
|||||||
6
README
6
README
@ -7,11 +7,11 @@ in `systemd.el`.
|
|||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
|
|
||||||
Available as the `systemd' package on MELPA <http://melpa.org/>.
|
Available as the `systemd` package on MELPA <https://melpa.org/>.
|
||||||
|
|
||||||
In Emacs 25 or later, one can locally install as a package with
|
In Emacs, one can locally install as a package with `make dist` and
|
||||||
|
|
||||||
M-x package-install-file RET /path/to/systemd-mode RET
|
M-x package-install-file RET /path/to/systemd-VERSION.tar RET
|
||||||
|
|
||||||
Otherwise, for either installing into one's `load-path` or a system
|
Otherwise, for either installing into one's `load-path` or a system
|
||||||
install, do the usual
|
install, do the usual
|
||||||
|
|||||||
316
network-directives.txt
Normal file
316
network-directives.txt
Normal file
@ -0,0 +1,316 @@
|
|||||||
|
ARP
|
||||||
|
ARPAllTargets
|
||||||
|
ARPIPTargets
|
||||||
|
ARPIntervalSec
|
||||||
|
ARPValidate
|
||||||
|
Activate
|
||||||
|
ActiveSlave
|
||||||
|
AdActorSystem
|
||||||
|
AdActorSystemPriority
|
||||||
|
AdSelect
|
||||||
|
AdUserPortKey
|
||||||
|
Address
|
||||||
|
AddressAutoconfiguration
|
||||||
|
Advertise
|
||||||
|
AgeingTimeSec
|
||||||
|
Alias
|
||||||
|
AllMulticast
|
||||||
|
AllSlavesActive
|
||||||
|
AllowLocalRemote
|
||||||
|
AllowPortToBeRoot
|
||||||
|
AllowedIPs
|
||||||
|
Anonymize
|
||||||
|
Architecture
|
||||||
|
AssignToLoopback
|
||||||
|
AssociatedWith
|
||||||
|
AutoJoin
|
||||||
|
AutoNegotiation
|
||||||
|
BSSID
|
||||||
|
BindCarrier
|
||||||
|
BitRate
|
||||||
|
BitsPerSecond
|
||||||
|
BlackList
|
||||||
|
Bond
|
||||||
|
Bridge
|
||||||
|
Broadcast
|
||||||
|
ClientIdentifier
|
||||||
|
CombinedChannels
|
||||||
|
ConfigureWithoutCarrier
|
||||||
|
CopyDSCP
|
||||||
|
Cost
|
||||||
|
DHCP
|
||||||
|
DHCPServer
|
||||||
|
DNS
|
||||||
|
DNSDefaultRoute
|
||||||
|
DNSLifetimeSec
|
||||||
|
DNSOverTLS
|
||||||
|
DNSSEC
|
||||||
|
DNSSECNegativeTrustAnchors
|
||||||
|
DUIDRawData
|
||||||
|
DUIDType
|
||||||
|
DefaultLeaseTimeSec
|
||||||
|
DefaultPVID
|
||||||
|
DefaultRouteOnDevice
|
||||||
|
Description
|
||||||
|
Destination
|
||||||
|
DestinationPort
|
||||||
|
DiscoverPathMTU
|
||||||
|
Domains
|
||||||
|
DownDelaySec
|
||||||
|
Driver
|
||||||
|
Duplex
|
||||||
|
DuplicateAddressDetection
|
||||||
|
DynamicTransmitLoadBalancing
|
||||||
|
ERSPANIndex
|
||||||
|
EgressUntagged
|
||||||
|
EmitDNS
|
||||||
|
EmitDomains
|
||||||
|
EmitLLDP
|
||||||
|
EmitNTP
|
||||||
|
EmitRouter
|
||||||
|
EmitSIP
|
||||||
|
EmitTimezone
|
||||||
|
Encapsulation
|
||||||
|
EncapsulationLimit
|
||||||
|
EncapsulationType
|
||||||
|
Encrypt
|
||||||
|
Endpoint
|
||||||
|
FDBAgeingSec
|
||||||
|
FOUDestinationPort
|
||||||
|
FOUSourcePort
|
||||||
|
FailOverMACPolicy
|
||||||
|
Family
|
||||||
|
FastLeave
|
||||||
|
FastOpenNoCookie
|
||||||
|
FirewallMark
|
||||||
|
Flags
|
||||||
|
FlowLabel
|
||||||
|
FooOverUDP
|
||||||
|
ForceDHCPv6PDOtherInformation
|
||||||
|
ForwardDelaySec
|
||||||
|
From
|
||||||
|
GVRP
|
||||||
|
Gateway
|
||||||
|
GatewayOnLink
|
||||||
|
GenericProtocolExtension
|
||||||
|
GenericReceiveOffload
|
||||||
|
GenericSegmentationOffload
|
||||||
|
GratuitousARP
|
||||||
|
Group
|
||||||
|
GroupForwardMask
|
||||||
|
GroupPolicyExtension
|
||||||
|
HairPin
|
||||||
|
HelloTimeSec
|
||||||
|
HomeAddress
|
||||||
|
Host
|
||||||
|
Hostname
|
||||||
|
IAID
|
||||||
|
IPDoNotFragment
|
||||||
|
IPForward
|
||||||
|
IPMasquerade
|
||||||
|
IPProtocol
|
||||||
|
IPServiceType
|
||||||
|
IPVLAN
|
||||||
|
IPv4LLRoute
|
||||||
|
IPv4ProxyARP
|
||||||
|
IPv6AcceptRA
|
||||||
|
IPv6DuplicateAddressDetection
|
||||||
|
IPv6FlowLabel
|
||||||
|
IPv6HopLimit
|
||||||
|
IPv6MTUBytes
|
||||||
|
IPv6Preference
|
||||||
|
IPv6PrefixDelegation
|
||||||
|
IPv6PrivacyExtensions
|
||||||
|
IPv6ProxyNDP
|
||||||
|
IPv6ProxyNDPAddress
|
||||||
|
IPv6RapidDeploymentPrefix
|
||||||
|
IPv6Token
|
||||||
|
ISATAP
|
||||||
|
Id
|
||||||
|
IgnoreCarrierLoss
|
||||||
|
IncomingInterface
|
||||||
|
Independent
|
||||||
|
InitialAdvertisedReceiveWindow
|
||||||
|
InitialCongestionWindow
|
||||||
|
InputKey
|
||||||
|
InterfaceId
|
||||||
|
InvertRule
|
||||||
|
KeepConfiguration
|
||||||
|
KernelCommandLine
|
||||||
|
KernelVersion
|
||||||
|
Key
|
||||||
|
KeyFile
|
||||||
|
KeyId
|
||||||
|
Kind
|
||||||
|
L2MissNotification
|
||||||
|
L3MissNotification
|
||||||
|
LACPTransmitRate
|
||||||
|
LLDP
|
||||||
|
LLMNR
|
||||||
|
Label
|
||||||
|
LargeReceiveOffload
|
||||||
|
Layer2SpecificHeader
|
||||||
|
LearnPacketIntervalSec
|
||||||
|
Learning
|
||||||
|
LifetimeSec
|
||||||
|
LinkLayerAddress
|
||||||
|
LinkLocalAddressing
|
||||||
|
ListenPort
|
||||||
|
Local
|
||||||
|
LooseBinding
|
||||||
|
MACAddress
|
||||||
|
MACAddressPolicy
|
||||||
|
MACVLAN
|
||||||
|
MACsec
|
||||||
|
MIIMonitorSec
|
||||||
|
MTUBytes
|
||||||
|
MVRP
|
||||||
|
MacLearning
|
||||||
|
ManageTemporaryAddress
|
||||||
|
Managed
|
||||||
|
MaxAgeSec
|
||||||
|
MaxAttempts
|
||||||
|
MaxLeaseTimeSec
|
||||||
|
MaximumFDBEntries
|
||||||
|
Metric
|
||||||
|
MinLinks
|
||||||
|
Mode
|
||||||
|
MultiQueue
|
||||||
|
Multicast
|
||||||
|
MulticastDNS
|
||||||
|
MulticastFlood
|
||||||
|
MulticastIGMPVersion
|
||||||
|
MulticastQuerier
|
||||||
|
MulticastRouter
|
||||||
|
MulticastSnooping
|
||||||
|
MulticastToUnicast
|
||||||
|
NTP
|
||||||
|
Name
|
||||||
|
NamePolicy
|
||||||
|
NeighborSuppression
|
||||||
|
NetworkEmulatorDelayJitterSec
|
||||||
|
NetworkEmulatorDelaySec
|
||||||
|
NetworkEmulatorDuplicateRate
|
||||||
|
NetworkEmulatorLossRate
|
||||||
|
NetworkEmulatorPacketLimit
|
||||||
|
OnLink
|
||||||
|
OriginalName
|
||||||
|
OtherChannels
|
||||||
|
OtherInformation
|
||||||
|
OutgoingInterface
|
||||||
|
OutputKey
|
||||||
|
PVID
|
||||||
|
PacketInfo
|
||||||
|
PacketNumber
|
||||||
|
PacketsPerSlave
|
||||||
|
Parent
|
||||||
|
Path
|
||||||
|
Peer
|
||||||
|
PeerPort
|
||||||
|
PeerSessionId
|
||||||
|
PeerTunnelId
|
||||||
|
PersistentKeepalive
|
||||||
|
PoolOffset
|
||||||
|
PoolSize
|
||||||
|
Port
|
||||||
|
PortRange
|
||||||
|
PreferredLifetime
|
||||||
|
PreferredLifetimeSec
|
||||||
|
PreferredSource
|
||||||
|
Prefix
|
||||||
|
PrefixDelegationHint
|
||||||
|
PrefixRoute
|
||||||
|
PresharedKey
|
||||||
|
PresharedKeyFile
|
||||||
|
PrimaryReselectPolicy
|
||||||
|
PrimarySlave
|
||||||
|
Priority
|
||||||
|
PrivateKey
|
||||||
|
PrivateKeyFile
|
||||||
|
Property
|
||||||
|
Protocol
|
||||||
|
ProxyARP
|
||||||
|
ProxyARPWiFi
|
||||||
|
PublicKey
|
||||||
|
QuickAck
|
||||||
|
RapidCommit
|
||||||
|
ReduceARPProxy
|
||||||
|
Remote
|
||||||
|
RemoteChecksumRx
|
||||||
|
RemoteChecksumTx
|
||||||
|
ReorderHeader
|
||||||
|
RequestBroadcast
|
||||||
|
RequestOptions
|
||||||
|
RequiredForOnline
|
||||||
|
ResendIGMP
|
||||||
|
RestartSec
|
||||||
|
Route
|
||||||
|
RouteMetric
|
||||||
|
RouteShortCircuit
|
||||||
|
RouteTable
|
||||||
|
RouterLifetimeSec
|
||||||
|
RouterPreference
|
||||||
|
RoutesToDNS
|
||||||
|
RxBufferSize
|
||||||
|
RxChannels
|
||||||
|
SSID
|
||||||
|
STP
|
||||||
|
SamplePoint
|
||||||
|
Scope
|
||||||
|
SendHostname
|
||||||
|
SendOption
|
||||||
|
SendRelease
|
||||||
|
SerializeTunneledPackets
|
||||||
|
SessionId
|
||||||
|
Source
|
||||||
|
SourcePort
|
||||||
|
TCP6SegmentationOffload
|
||||||
|
TCPSegmentationOffload
|
||||||
|
TOS
|
||||||
|
TTL
|
||||||
|
TTLPropagate
|
||||||
|
Table
|
||||||
|
Timezone
|
||||||
|
To
|
||||||
|
TransmitHashPolicy
|
||||||
|
TripleSampling
|
||||||
|
Tunnel
|
||||||
|
TunnelId
|
||||||
|
TxBufferSize
|
||||||
|
TxChannels
|
||||||
|
Type
|
||||||
|
TypeOfService
|
||||||
|
UDP6ZeroChecksumRx
|
||||||
|
UDP6ZeroChecksumTx
|
||||||
|
UDPChecksum
|
||||||
|
UDPSourcePort
|
||||||
|
UnicastFlood
|
||||||
|
Unmanaged
|
||||||
|
UpDelaySec
|
||||||
|
UseAutonomousPrefix
|
||||||
|
UseBPDU
|
||||||
|
UseDNS
|
||||||
|
UseDomains
|
||||||
|
UseForEncoding
|
||||||
|
UseHostname
|
||||||
|
UseMTU
|
||||||
|
UseNTP
|
||||||
|
UseOnLinkPrefix
|
||||||
|
UseRoutes
|
||||||
|
UseSIP
|
||||||
|
UseTimezone
|
||||||
|
User
|
||||||
|
UserClass
|
||||||
|
VLAN
|
||||||
|
VLANFiltering
|
||||||
|
VLANId
|
||||||
|
VNI
|
||||||
|
VNetHeader
|
||||||
|
VRF
|
||||||
|
VXLAN
|
||||||
|
ValidLifetimeSec
|
||||||
|
VendorClassIdentifier
|
||||||
|
Virtualization
|
||||||
|
WLANInterfaceType
|
||||||
|
WakeOnLan
|
||||||
|
Xfrm
|
||||||
38
nspawn-directives.txt
Normal file
38
nspawn-directives.txt
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
Boot
|
||||||
|
Ephemeral
|
||||||
|
ProcessTwo
|
||||||
|
Parameters
|
||||||
|
Environment
|
||||||
|
User
|
||||||
|
WorkingDirectory
|
||||||
|
PivotRoot
|
||||||
|
Capability
|
||||||
|
NoNewPrivileges
|
||||||
|
KillSignal
|
||||||
|
Personality
|
||||||
|
MachineID
|
||||||
|
PrivateUsers
|
||||||
|
NotifyReady
|
||||||
|
SystemCallFilter
|
||||||
|
LimitCPU
|
||||||
|
OOMScoreAdjust
|
||||||
|
CPUAffinity
|
||||||
|
Hostname
|
||||||
|
ResolvConf
|
||||||
|
Timezone
|
||||||
|
LinkJournal
|
||||||
|
ReadOnly
|
||||||
|
Volatile
|
||||||
|
Bind
|
||||||
|
TemporaryFileSystem
|
||||||
|
Inaccessible
|
||||||
|
Overlay
|
||||||
|
PrivateUsersChown
|
||||||
|
Private
|
||||||
|
VirtualEthernet
|
||||||
|
VirtualEthernetExtra
|
||||||
|
Interface
|
||||||
|
MACVLAN
|
||||||
|
Bridge
|
||||||
|
Zone
|
||||||
|
Port
|
||||||
@ -1,186 +0,0 @@
|
|||||||
;;; systemd-company.el --- company backend for systemd unit directives -*- lexical-binding: t -*-
|
|
||||||
|
|
||||||
;; Copyright (C) 2015 Mark Oteiza <mvoteiza@udel.edu>
|
|
||||||
|
|
||||||
;; Author: Mark Oteiza <mvoteiza@udel.edu>
|
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or
|
|
||||||
;; modify it under the terms of the GNU General Public License
|
|
||||||
;; as published by the Free Software Foundation; either version 3
|
|
||||||
;; of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
;; This program is distributed in the hope that it will be useful,
|
|
||||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
;; GNU General Public License for more details.
|
|
||||||
|
|
||||||
;; You should have received a copy of the GNU General Public License
|
|
||||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
;;; Commentary:
|
|
||||||
|
|
||||||
;;; Code:
|
|
||||||
|
|
||||||
(require 'cl-lib)
|
|
||||||
|
|
||||||
(declare-function company-mode "company")
|
|
||||||
(declare-function company-begin-backend "company")
|
|
||||||
(declare-function company-grab-symbol "company")
|
|
||||||
|
|
||||||
(defconst systemd-company-unit-sections
|
|
||||||
'("Unit" "Install" "Service")
|
|
||||||
"Configuration sections for systemd 225.")
|
|
||||||
|
|
||||||
(defconst systemd-company-unit-directives
|
|
||||||
;; TODO: keep a script of sorts for generating this list. systemd
|
|
||||||
;; source has a python script in tools/ for parsing the
|
|
||||||
;; documentation xml for the unit directives.
|
|
||||||
;;
|
|
||||||
;; forcer on freenode threw together a curl monstrosity for achieving
|
|
||||||
;; the same:
|
|
||||||
;; curl -s http://www.freedesktop.org/software/systemd/man/systemd.directives.html | tr -d '\n' | sed 's/>/>\n/g' | sed -ne '/Unit directives/,/Options on the kernel/p' | sed -ne 's/.*<dt id="\([^-][^"]*\)=">.*/\1/p'
|
|
||||||
;; Quote, wrap with fill-column at 72, insert into list and indent
|
|
||||||
'("Accept" "AccuracySec" "After" "Alias" "AllowIsolate" "Also"
|
|
||||||
"AppArmorProfile" "AssertACPower" "AssertArchitecture"
|
|
||||||
"AssertCapability" "AssertDirectoryNotEmpty" "AssertFileIsExecutable"
|
|
||||||
"AssertFileNotEmpty" "AssertFirstBoot" "AssertHost"
|
|
||||||
"AssertKernelCommandLine" "AssertNeedsUpdate" "AssertPathExists"
|
|
||||||
"AssertPathExistsGlob" "AssertPathIsDirectory" "AssertPathIsMountPoint"
|
|
||||||
"AssertPathIsReadWrite" "AssertPathIsSymbolicLink" "AssertSecurity"
|
|
||||||
"AssertVirtualization" "Backlog" "Before" "BindIPv6Only" "BindToDevice"
|
|
||||||
"BindsTo" "BlockIOAccounting" "BlockIODeviceWeight"
|
|
||||||
"BlockIOReadBandwidth" "BlockIOWeight" "BlockIOWriteBandwidth"
|
|
||||||
"Broadcast" "BusName" "BusPolicy" "CPUAccounting" "CPUAffinity"
|
|
||||||
"CPUQuota" "CPUSchedulingPolicy" "CPUSchedulingPriority"
|
|
||||||
"CPUSchedulingResetOnFork" "CPUShares" "Capabilities"
|
|
||||||
"CapabilityBoundingSet" "ConditionACPower" "ConditionArchitecture"
|
|
||||||
"ConditionCapability" "ConditionDirectoryNotEmpty"
|
|
||||||
"ConditionFileIsExecutable" "ConditionFileNotEmpty" "ConditionFirstBoot"
|
|
||||||
"ConditionHost" "ConditionKernelCommandLine" "ConditionNeedsUpdate"
|
|
||||||
"ConditionPathExists" "ConditionPathExistsGlob"
|
|
||||||
"ConditionPathIsDirectory" "ConditionPathIsMountPoint"
|
|
||||||
"ConditionPathIsReadWrite" "ConditionPathIsSymbolicLink"
|
|
||||||
"ConditionSecurity" "ConditionVirtualization" "Conflicts"
|
|
||||||
"DefaultDependencies" "DefaultInstance" "DeferAcceptSec" "Delegate"
|
|
||||||
"Description" "DeviceAllow" "DevicePolicy" "DirectoryMode"
|
|
||||||
"DirectoryNotEmpty" "Documentation" "Environment" "EnvironmentFile"
|
|
||||||
"ExecReload" "ExecStart" "ExecStartPost" "ExecStartPre" "ExecStop"
|
|
||||||
"ExecStopPost" "ExecStopPre" "FailureAction" "FileDescriptorStoreMax"
|
|
||||||
"FreeBind" "Group" "GuessMainPID" "IOSchedulingClass"
|
|
||||||
"IOSchedulingPriority" "IPTOS" "IPTTL" "IgnoreOnIsolate"
|
|
||||||
"IgnoreOnSnapshot" "IgnoreSIGPIPE" "InaccessibleDirectories"
|
|
||||||
"JobTimeoutAction" "JobTimeoutRebootArgument" "JobTimeoutSec"
|
|
||||||
"JoinsNamespaceOf" "KeepAlive" "KeepAliveIntervalSec" "KeepAliveProbes"
|
|
||||||
"KeepAliveTimeSec" "KillMode" "KillSignal" "LimitAS" "LimitCORE"
|
|
||||||
"LimitCPU" "LimitDATA" "LimitFSIZE" "LimitLOCKS" "LimitMEMLOCK"
|
|
||||||
"LimitMSGQUEUE" "LimitNICE" "LimitNOFILE" "LimitNPROC" "LimitRSS"
|
|
||||||
"LimitRTPRIO" "LimitRTTIME" "LimitSIGPENDING" "LimitSTACK"
|
|
||||||
"ListenDatagram" "ListenFIFO" "ListenMessageQueue" "ListenNetlink"
|
|
||||||
"ListenSequentialPacket" "ListenSpecial" "ListenStream" "MakeDirectory"
|
|
||||||
"Mark" "MaxConnections" "MemoryAccounting" "MemoryLimit"
|
|
||||||
"MessageQueueMaxMessages" "MessageQueueMessageSize" "MountFlags" "Nice"
|
|
||||||
"NoDelay" "NoNewPrivileges" "NonBlocking" "NotifyAccess"
|
|
||||||
"OOMScoreAdjust" "OnActiveSec" "OnBootSec" "OnCalendar" "OnFailure"
|
|
||||||
"OnFailureJobMode" "OnStartupSec" "OnUnitActiveSec" "OnUnitInactiveSec"
|
|
||||||
"Options" "PAMName" "PIDFile" "PartOf" "PassCredentials" "PassSecurity"
|
|
||||||
"PathChanged" "PathExists" "PathExistsGlob" "PathModified"
|
|
||||||
"PermissionsStartOnly" "Persistent" "Personality" "PipeSize" "Priority"
|
|
||||||
"PrivateDevices" "PrivateNetwork" "PrivateTmp" "PropagatesReloadTo"
|
|
||||||
"ProtectHome" "ProtectSystem" "ReadOnlyDirectories"
|
|
||||||
"ReadWriteDirectories" "RebootArgument" "ReceiveBuffer"
|
|
||||||
"RefuseManualStart" "RefuseManualStop" "ReloadPropagatedFrom"
|
|
||||||
"RemainAfterExit" "RemoveOnStop" "RequiredBy" "Requires"
|
|
||||||
"RequiresMountsFor" "RequiresOverridable" "Requisite"
|
|
||||||
"RequisiteOverridable" "Restart" "RestartForceExitStatus"
|
|
||||||
"RestartPreventExitStatus" "RestartSec" "RestrictAddressFamilies"
|
|
||||||
"ReusePort" "RootDirectory" "RootDirectoryStartOnly" "RuntimeDirectory"
|
|
||||||
"RuntimeDirectoryMode" "SELinuxContext" "SELinuxContextFromNet"
|
|
||||||
"SecureBits" "SendBuffer" "SendSIGHUP" "SendSIGKILL" "Service" "Slice"
|
|
||||||
"SloppyOptions" "SmackLabel" "SmackLabelIPIn" "SmackLabelIPOut"
|
|
||||||
"SmackProcessLabel" "SocketGroup" "SocketMode" "SocketUser" "Sockets"
|
|
||||||
"SourcePath" "StandardError" "StandardInput" "StandardOutput"
|
|
||||||
"StartLimitAction" "StartLimitBurst" "StartLimitInterval"
|
|
||||||
"StartupBlockIOWeight" "StartupCPUShares" "StopWhenUnneeded"
|
|
||||||
"SuccessExitStatus" "SupplementaryGroups" "Symlinks" "SyslogFacility"
|
|
||||||
"SyslogIdentifier" "SyslogLevel" "SyslogLevelPrefix"
|
|
||||||
"SystemCallArchitectures" "SystemCallErrorNumber" "SystemCallFilter"
|
|
||||||
"TCPCongestion" "TTYPath" "TTYReset" "TTYVHangup" "TTYVTDisallocate"
|
|
||||||
"TimeoutIdleSec" "TimeoutSec" "TimeoutStartSec" "TimeoutStopSec"
|
|
||||||
"TimerSlackNSec" "Transparent" "Type" "UMask" "Unit" "User"
|
|
||||||
"UtmpIdentifier" "UtmpMode" "WakeSystem" "WantedBy" "Wants"
|
|
||||||
"WatchdogSec" "What" "Where" "WorkingDirectory")
|
|
||||||
"Configuration directives for systemd 226.")
|
|
||||||
|
|
||||||
(defconst systemd-company-network-sections
|
|
||||||
'("Match" "Link" "NetDev" "VLAN" "MACVLAN" "MACVTAP" "IPVLAN" "VXLAN"
|
|
||||||
"Tunnel" "Peer" "Tun" "Tap" "Bond" "Network" "Address" "Route" "DHCP"
|
|
||||||
"Bridge" "BridgeFDB")
|
|
||||||
"Network configuration sections for systemd 225.")
|
|
||||||
|
|
||||||
(defconst systemd-company-network-directives
|
|
||||||
;; /Network directives/,/Journal fields/p
|
|
||||||
'("ARPAllTargets" "ARPIPTargets" "ARPIntervalSec" "ARPProxy" "ARPValidate"
|
|
||||||
"AdSelect" "Address" "AllSlavesActive" "AllowPortToBeRoot"
|
|
||||||
"Architecture" "BindCarrier" "BitsPerSecond" "Bond" "Bridge"
|
|
||||||
"ClientIdentifier" "CopyDSCP" "Cost" "CriticalConnection" "DHCP"
|
|
||||||
"DHCPServer" "DNS" "DefaultLeaseTimeSec" "Description" "Destination" "DiscoverPathMTU"
|
|
||||||
"Domains" "DownDelaySec" "Driver" "Duplex" "EmitDNS" "EmitNTP"
|
|
||||||
"EmitTimezone" "EncapsulationLimit" "FDBAgeingSec" "FailOverMACPolicy"
|
|
||||||
"FallbackDNS" "FallbackNTP" "FastLeave" "Gateway" "GratuitousARP"
|
|
||||||
"GroupPolicyExtension" "HairPin" "Host" "Hostname" "IPForward"
|
|
||||||
"IPMasquerade" "IPv4LLRoute" "IPv6FlowLabel" "IPv6PrivacyExtensions"
|
|
||||||
"IPv6Token" "Id" "KernelCommandLine" "Kind" "L2MissNotification"
|
|
||||||
"L3MissNotification" "LACPTransmitRate" "LLDP" "LLMNR" "Label"
|
|
||||||
"LearnPacketIntervalSec" "LinkLocalAddressing" "Local" "MACAddress"
|
|
||||||
"MACAddressPolicy" "MACVLAN" "MIIMonitorSec" "MTUBytes" "MacLearning"
|
|
||||||
"MaxLeaseTimeSec" "Metric" "MinLinks" "Mode" "MultiQueue" "NTP" "Name"
|
|
||||||
"NamePolicy" "OneQueue" "OriginalName" "PacketInfo" "PacketsPerSlave"
|
|
||||||
"Path" "Peer" "PoolOffset" "PoolSize" "PrimaryReselectPolicy" "Remote"
|
|
||||||
"RequestBroadcast" "ResendIGMP" "RouteMetric" "RouteShortCircuit"
|
|
||||||
"Scope" "SendHostname" "Source" "TOS" "TTL" "Timezone"
|
|
||||||
"TransmitHashPolicy" "Tunnel" "UDP6ZeroCheckSumRx" "UDP6ZeroChecksumTx"
|
|
||||||
"UDPCheckSum" "UnicastFlood" "UpDelaySec" "UseBPDU" "UseDNS"
|
|
||||||
"UseDomains" "UseHostname" "UseMTU" "UseNTP" "UseRoutes" "UseTimezone"
|
|
||||||
"VLAN" "VLANId" "VNetHeader" "VXLAN" "VendorClassIdentifier"
|
|
||||||
"Virtualization" "WakeOnLan")
|
|
||||||
"Network configuration directives for systemd 226.")
|
|
||||||
|
|
||||||
(defun systemd-company--setup (enable)
|
|
||||||
(when (fboundp 'systemd-company--setup-company)
|
|
||||||
(systemd-company--setup-company enable)))
|
|
||||||
|
|
||||||
(defun systemd-company-section-p ()
|
|
||||||
"Return t if current line begins with \"[\", otherwise nil."
|
|
||||||
(save-excursion
|
|
||||||
(beginning-of-line)
|
|
||||||
(looking-at "\\[")))
|
|
||||||
|
|
||||||
(defun systemd-company-network-p ()
|
|
||||||
"Return non-nil if `buffer-name' has a network-type extension, otherwise nil."
|
|
||||||
(string-match "\\.\\(link\\|netdev\\|network\\)\\'" (buffer-name)))
|
|
||||||
|
|
||||||
(with-eval-after-load "company"
|
|
||||||
(defun systemd-company-backend (command &optional arg &rest ignored)
|
|
||||||
(interactive (list 'interactive))
|
|
||||||
(cl-case command
|
|
||||||
(interactive (company-begin-backend 'systemd-company-backend))
|
|
||||||
(prefix (and (eq major-mode 'systemd-mode)
|
|
||||||
(company-grab-symbol)))
|
|
||||||
(candidates
|
|
||||||
(cl-remove-if-not
|
|
||||||
(lambda (c) (string-prefix-p arg c))
|
|
||||||
(if (systemd-company-network-p)
|
|
||||||
(if (systemd-company-section-p)
|
|
||||||
systemd-company-network-sections
|
|
||||||
systemd-company-network-directives)
|
|
||||||
(if (systemd-company-section-p)
|
|
||||||
systemd-company-unit-sections
|
|
||||||
systemd-company-unit-directives))))))
|
|
||||||
(defun systemd-company--setup-company (enable)
|
|
||||||
(when enable
|
|
||||||
(add-to-list (make-local-variable 'company-backends) 'systemd-company-backend))
|
|
||||||
(company-mode (if enable 1 -1))))
|
|
||||||
|
|
||||||
(provide 'systemd-company)
|
|
||||||
|
|
||||||
;;; systemd-company.el ends here
|
|
||||||
324
systemd.el
324
systemd.el
@ -1,9 +1,9 @@
|
|||||||
;;; systemd.el --- Major mode for editing systemd units -*- lexical-binding: t -*-
|
;;; systemd.el --- Major mode for editing systemd units -*- lexical-binding: t -*-
|
||||||
|
|
||||||
;; Copyright (C) 2014-2015 Mark Oteiza <mvoteiza@udel.edu>
|
;; Copyright (C) 2014-2023 Mark Oteiza <mvoteiza@udel.edu>
|
||||||
|
|
||||||
;; Author: Mark Oteiza <mvoteiza@udel.edu>
|
;; Author: Mark Oteiza <mvoteiza@udel.edu>
|
||||||
;; Version: 1.3.1
|
;; Version: 1.6.1
|
||||||
;; Package-Requires: ((emacs "24.4"))
|
;; Package-Requires: ((emacs "24.4"))
|
||||||
;; Keywords: tools, unix
|
;; Keywords: tools, unix
|
||||||
|
|
||||||
@ -24,13 +24,17 @@
|
|||||||
|
|
||||||
;; Major mode for editing systemd units.
|
;; Major mode for editing systemd units.
|
||||||
|
|
||||||
;; Similar to `conf-mode' but with added highlighting; e.g. for
|
;; Similar to `conf-mode' but with enhanced highlighting; e.g. for
|
||||||
;; specifiers and booleans. Employs strict regex for whitespace.
|
;; specifiers and booleans. Employs strict regex for whitespace.
|
||||||
;; Features a facility for browsing documentation: use C-c C-o to open
|
;; Features a facility for browsing documentation: use C-c C-o to open
|
||||||
;; links to documentation in a unit (cf. systemctl help).
|
;; links to documentation in a unit (cf. systemctl help).
|
||||||
|
|
||||||
;; Supports completion via `company-mode' of directives and sections
|
;; Supports completion of directives and sections in either units or
|
||||||
;; in either units or network configuration.
|
;; network configuration. Both a completer for
|
||||||
|
;; `completion-at-point-functions' and a company backend are provided.
|
||||||
|
;; The latter can be enabled by adding `company-mode' to
|
||||||
|
;; `systemd-mode-hook' and adding `systemd-company-backend' to
|
||||||
|
;; `company-backends'.
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
@ -38,11 +42,15 @@
|
|||||||
(require 'thingatpt)
|
(require 'thingatpt)
|
||||||
(require 'url-parse)
|
(require 'url-parse)
|
||||||
|
|
||||||
(require 'systemd-company)
|
(declare-function company-begin-backend "company")
|
||||||
|
(declare-function company-grab-symbol "company")
|
||||||
|
|
||||||
|
(defvar font-lock-beg)
|
||||||
|
(defvar font-lock-end)
|
||||||
|
|
||||||
(defgroup systemd ()
|
(defgroup systemd ()
|
||||||
"Major mode for editing systemd units."
|
"Major mode for editing systemd units."
|
||||||
:link '(url-link "http://www.freedesktop.org/wiki/Software/systemd/")
|
:link '(url-link "https://www.freedesktop.org/wiki/Software/systemd/")
|
||||||
:group 'tools)
|
:group 'tools)
|
||||||
|
|
||||||
(defcustom systemd-browse-url-function 'browse-url
|
(defcustom systemd-browse-url-function 'browse-url
|
||||||
@ -66,45 +74,92 @@
|
|||||||
(function :tag "Other function"))
|
(function :tag "Other function"))
|
||||||
:group 'systemd)
|
:group 'systemd)
|
||||||
|
|
||||||
(defcustom systemd-use-company-p t
|
(defcustom systemd-mode-hook nil
|
||||||
"Whether to use `company-mode' for completion, if available."
|
"Hook run after entering `systemd-mode'."
|
||||||
:type 'boolean
|
:type 'hook
|
||||||
|
:options '(company-mode flycheck-mode)
|
||||||
:group 'systemd)
|
:group 'systemd)
|
||||||
|
|
||||||
(defvar systemd-font-lock-keywords
|
(defconst systemd-unit-sections
|
||||||
`(("^\\([#;]\\)\\(.*\\)$"
|
'("Unit" "Install" "Service")
|
||||||
(1 'font-lock-comment-delimiter-face)
|
"Configuration sections for systemd 244.")
|
||||||
(2 'font-lock-comment-face))
|
|
||||||
("\\\\$" 0 'font-lock-warning-face) ; line break
|
(defconst systemd-unit-directives
|
||||||
;; sections
|
(eval-when-compile
|
||||||
("^\\(\\[[[:upper:]][[:alnum:]]+\\]\\)"
|
(with-temp-buffer
|
||||||
1 'font-lock-type-face)
|
(insert-file-contents
|
||||||
;; keys
|
(let ((f "unit-directives.txt"))
|
||||||
("^\\([[:upper:]][[:alnum:]]+\\)="
|
(if (null load-file-name) f
|
||||||
1 'font-lock-keyword-face)
|
(expand-file-name f (file-name-directory load-file-name)))))
|
||||||
;; boolean arguments
|
(split-string (buffer-string))))
|
||||||
("=\\(1\\|yes\\|true\\|on\\|0\\|no\\|false\\|off\\)$"
|
"Configuration directives for systemd.")
|
||||||
1 'font-lock-constant-face)
|
|
||||||
;; specifiers
|
(defconst systemd-network-sections
|
||||||
("%[nNpPiIfcrRtuUhsmbHv%]" 0 'font-lock-constant-face)
|
'("Match" "Link" "NetDev" "VLAN" "MACVLAN" "MACVTAP" "IPVLAN" "IPVTAP" "VXLAN"
|
||||||
;; exec prefixes
|
"GENEVE" "L2TP" "L2TPsession" "MACsec" "FooOverUDP"
|
||||||
("=\\(-@\\|@-\\|[@-]\\)"
|
"Tunnel" "Peer" "Tun" "Tap" "Bond" "Network" "Address" "Route" "DHCP"
|
||||||
1 'font-lock-negation-char-face))
|
"Neighbor" "IPv6AddressLabel" "RoutingPolicyRule" "NextHop" "DHCPv4"
|
||||||
"Default expressions to highlight in `systemd-mode'.
|
"DHCPv6" "IPv6AcceptRA" "DHCPServer" "IPv6Prefix" "CAN"
|
||||||
See systemd.unit(5) for details on unit file syntax.")
|
"Bridge" "BridgeFDB" "BridgeVLAN" "VXCAN" "WireGuard" "WireGuardPeer")
|
||||||
|
"Network configuration sections for systemd 244 (not exhaustive).")
|
||||||
|
|
||||||
|
(defconst systemd-network-directives
|
||||||
|
(eval-when-compile
|
||||||
|
(with-temp-buffer
|
||||||
|
(insert-file-contents
|
||||||
|
(let ((f "network-directives.txt"))
|
||||||
|
(if (null load-file-name) f
|
||||||
|
(expand-file-name f (file-name-directory load-file-name)))))
|
||||||
|
(split-string (buffer-string))))
|
||||||
|
"Network configuration directives for systemd.")
|
||||||
|
|
||||||
|
(defconst systemd-nspawn-sections
|
||||||
|
'("Exec" "Files" "Network")
|
||||||
|
"Namespace container configuration sections for systemd 244.")
|
||||||
|
|
||||||
|
(defconst systemd-nspawn-directives
|
||||||
|
(eval-when-compile
|
||||||
|
(with-temp-buffer
|
||||||
|
(insert-file-contents
|
||||||
|
(let ((f "nspawn-directives.txt"))
|
||||||
|
(if (null load-file-name) f
|
||||||
|
(expand-file-name f (file-name-directory load-file-name)))))
|
||||||
|
(split-string (buffer-string))))
|
||||||
|
"Namespace container configuration directives for systemd.")
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defconst systemd-autoload-regexp
|
||||||
|
(rx (+? (any "a-zA-Z0-9-_.@\\")) "."
|
||||||
|
(or "automount" "busname" "mount" "service" "slice"
|
||||||
|
"socket" "swap" "target" "timer" "link" "netdev" "network")
|
||||||
|
string-end)
|
||||||
|
"Regexp for file buffers in which to autoload `systemd-mode'.")
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defconst systemd-tempfn-autoload-regexp
|
||||||
|
(rx ".#"
|
||||||
|
(or (and (+? (any "a-zA-Z0-9-_.@\\")) "."
|
||||||
|
(or "automount" "busname" "mount" "service" "slice"
|
||||||
|
"socket" "swap" "target" "timer" "link" "netdev" "network"))
|
||||||
|
"override.conf")
|
||||||
|
(= 16 (char hex-digit)) string-end)
|
||||||
|
"Regexp for temp file buffers in which to autoload `systemd-mode'.")
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defconst systemd-dropin-autoload-regexp
|
||||||
|
(rx "/systemd/" (+? anything) ".d/" (+? (not (any ?/))) ".conf" string-end)
|
||||||
|
"Regexp for dropin config file buffers in which to autoload `systemd-mode'.")
|
||||||
|
|
||||||
(defun systemd-get-value (start)
|
(defun systemd-get-value (start)
|
||||||
"Return the value of the key whose value begins at position START.
|
"Return the value of the key whose value begins at position START.
|
||||||
Lines ending in a backslash are concatenated with the next
|
Lines ending in a backslash are concatenated with the next
|
||||||
according to systemd.unit(5)."
|
according to systemd.unit(5)."
|
||||||
(let ((break "\\\\\n")
|
(let (end)
|
||||||
end)
|
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(while (progn (goto-char (1- (line-end-position)))
|
(while (= (char-before (line-end-position)) ?\\)
|
||||||
(looking-at break))
|
|
||||||
(forward-line))
|
(forward-line))
|
||||||
(setq end (line-end-position))
|
(setq end (line-end-position))
|
||||||
(replace-regexp-in-string break " " (buffer-substring start end)))))
|
(replace-regexp-in-string "\\\\\n" " " (buffer-substring start end)))))
|
||||||
|
|
||||||
(defun systemd-doc-find ()
|
(defun systemd-doc-find ()
|
||||||
"Find the value of the unit's “Documentation” keys.
|
"Find the value of the unit's “Documentation” keys.
|
||||||
@ -151,13 +206,170 @@ file, defaulting to the link under point, if any."
|
|||||||
(interactive)
|
(interactive)
|
||||||
(systemd-doc-man "systemd.directives(7)"))
|
(systemd-doc-man "systemd.directives(7)"))
|
||||||
|
|
||||||
|
(defun systemd-buffer-section-p ()
|
||||||
|
"Return t if current line begins with \"[\", otherwise nil."
|
||||||
|
(= (char-after (line-beginning-position)) ?\[))
|
||||||
|
|
||||||
|
(defun systemd-file-network-p (filename)
|
||||||
|
"Return non-nil if FILENAME has a network-type extension, otherwise nil."
|
||||||
|
(string-match-p (rx "." (or "link" "netdev" "network") string-end)
|
||||||
|
filename))
|
||||||
|
|
||||||
|
(defun systemd-file-nspawn-p (filename)
|
||||||
|
"Return non-nil if FILENAME has an nspawn extension, otherwise nil."
|
||||||
|
(string-match-p (rx ".nspawn" string-end) filename))
|
||||||
|
|
||||||
|
(defun systemd-completion-table (&rest _ignore)
|
||||||
|
"Return a list of completion candidates."
|
||||||
|
(let ((sectionp (systemd-buffer-section-p))
|
||||||
|
(name (buffer-name)))
|
||||||
|
(cond
|
||||||
|
((systemd-file-nspawn-p name)
|
||||||
|
(if sectionp systemd-nspawn-sections systemd-nspawn-directives))
|
||||||
|
((systemd-file-network-p name)
|
||||||
|
(if sectionp systemd-network-sections systemd-network-directives))
|
||||||
|
(t (if sectionp systemd-unit-sections systemd-unit-directives)))))
|
||||||
|
|
||||||
|
(defun systemd-complete-at-point ()
|
||||||
|
"Complete the symbol at point."
|
||||||
|
(let ((bounds (bounds-of-thing-at-point 'symbol)))
|
||||||
|
(list (or (car bounds) (point))
|
||||||
|
(or (cdr bounds) (point))
|
||||||
|
(completion-table-dynamic #'systemd-completion-table))))
|
||||||
|
|
||||||
|
(defun systemd-company-backend (command &optional arg &rest _ignored)
|
||||||
|
"Backend for `company-mode' in `systemd-mode' buffers."
|
||||||
|
(interactive (list 'interactive))
|
||||||
|
(pcase command
|
||||||
|
(`interactive (company-begin-backend 'systemd-company-backend))
|
||||||
|
(`prefix (and (eq major-mode 'systemd-mode) (company-grab-symbol)))
|
||||||
|
(`candidates (all-completions arg (systemd-completion-table nil)))
|
||||||
|
(`post-completion (if (not (systemd-buffer-section-p)) (insert "=")))))
|
||||||
|
|
||||||
|
(defun systemd-construct-start-p ()
|
||||||
|
"Return non-nil if the current line is the first in a multi-line construct."
|
||||||
|
(let ((flag t))
|
||||||
|
(save-excursion
|
||||||
|
(while (and (zerop (forward-line -1))
|
||||||
|
(eq ?\\ (char-before (line-end-position)))
|
||||||
|
(skip-chars-forward " \t")
|
||||||
|
(setq flag (memq (following-char) '(?# ?\;))))))
|
||||||
|
flag))
|
||||||
|
|
||||||
|
(defun systemd-syntax-propertize (start end)
|
||||||
|
"`systemd-propertize-function' for `systemd-mode' buffers."
|
||||||
|
(let ((case-fold-search nil))
|
||||||
|
(goto-char start)
|
||||||
|
(funcall
|
||||||
|
(syntax-propertize-rules
|
||||||
|
("^[ \t]*\\([;#]\\)$?"
|
||||||
|
(1 (when (systemd-construct-start-p) (string-to-syntax "<")))))
|
||||||
|
start end)))
|
||||||
|
|
||||||
|
(defun systemd-value-extend-region ()
|
||||||
|
"Return the EOL position of the last line of the construct at point."
|
||||||
|
(while (and (= (char-before (line-end-position)) ?\\)
|
||||||
|
(skip-chars-forward " \t")
|
||||||
|
(not (memq (following-char) '(?# ?\;)))
|
||||||
|
(zerop (forward-line))))
|
||||||
|
(line-end-position))
|
||||||
|
|
||||||
|
(defun systemd-font-lock-extend-region ()
|
||||||
|
(goto-char font-lock-beg)
|
||||||
|
(while (and (zerop (forward-line -1))
|
||||||
|
(= (char-before (line-end-position)) ?\\)
|
||||||
|
(skip-chars-forward " \t")
|
||||||
|
(not (memq (following-char) '(?# ?\;)))))
|
||||||
|
(setq font-lock-beg (point-marker))
|
||||||
|
(goto-char font-lock-end)
|
||||||
|
(setq font-lock-end (systemd-value-extend-region)))
|
||||||
|
|
||||||
|
(defmacro define-systemd-matcher (name regexp &optional docstring)
|
||||||
|
"Define a new function NAME that matches REGEXP in a multi-line construct.
|
||||||
|
Only returns matches of REGEXP on lines passing `systemd-construct-start-p'."
|
||||||
|
(declare (debug (symbolp stringp &optional stringp))
|
||||||
|
(indent 2) (doc-string 3))
|
||||||
|
`(defun ,name (limit)
|
||||||
|
,docstring
|
||||||
|
(let (match)
|
||||||
|
(while (and (setq match (re-search-forward ,regexp limit t))
|
||||||
|
(not (systemd-construct-start-p))))
|
||||||
|
match)))
|
||||||
|
|
||||||
|
(define-systemd-matcher systemd-section-matcher
|
||||||
|
"^\\(\\[\\([[:upper:]][[:alnum:]]+\\|X-.*?\\)\\]\\)"
|
||||||
|
"Matcher for section titles.")
|
||||||
|
|
||||||
|
(define-systemd-matcher systemd-key-matcher "^\\([[:upper:]][[:alnum:]]+\\)="
|
||||||
|
"Matcher for keys (unit directives).")
|
||||||
|
|
||||||
|
(defun systemd-exec-prefix-anchored-matcher (limit)
|
||||||
|
"Matcher for the exec prefix in anchored font-lock rule.
|
||||||
|
See `font-lock-keywords' and (info \"(elisp) Search-based Fontification\")."
|
||||||
|
(let ((pos (car (match-data)))
|
||||||
|
(prefixes '(?- ?@ ?+))
|
||||||
|
char end res)
|
||||||
|
(while (and (memq (setq char (following-char)) prefixes)
|
||||||
|
(< (point) limit))
|
||||||
|
(forward-char)
|
||||||
|
(setq prefixes (remq char prefixes))
|
||||||
|
(setq end (point-marker)))
|
||||||
|
(when end
|
||||||
|
(prog1 (setq res (list (1+ pos) end))
|
||||||
|
(set-match-data res)))))
|
||||||
|
|
||||||
|
(defconst systemd-font-lock-keywords-1
|
||||||
|
'((systemd-section-matcher 1 'font-lock-type-face)
|
||||||
|
(systemd-key-matcher 1 'font-lock-keyword-face))
|
||||||
|
"Minimal expressions to highlight in `systemd-mode'.")
|
||||||
|
|
||||||
|
(defconst systemd-font-lock-keywords-2
|
||||||
|
`(,@systemd-font-lock-keywords-1
|
||||||
|
("\\\\$" 0 'font-lock-warning-face) ; line break
|
||||||
|
;; boolean arguments
|
||||||
|
(,(rx "=" (group (or "yes" "true" "on" "0" "no" "false" "off")) eol)
|
||||||
|
1 'font-lock-constant-face)
|
||||||
|
("="
|
||||||
|
;; exec prefixes
|
||||||
|
(systemd-exec-prefix-anchored-matcher
|
||||||
|
nil nil (0 'font-lock-negation-char-face))
|
||||||
|
;; environment variables
|
||||||
|
("\\$[A-Z_]+\\>"
|
||||||
|
(systemd-value-extend-region) nil (0 'font-lock-variable-name-face))
|
||||||
|
;; specifiers
|
||||||
|
("%[abBCEfgGhHiIjJlLmnNopPrRsStTuUvVw%]"
|
||||||
|
(systemd-value-extend-region) nil (0 'font-lock-constant-face))))
|
||||||
|
"Extended expressions to highlight in `systemd-mode'.")
|
||||||
|
|
||||||
|
(defconst systemd-font-lock-keywords-3
|
||||||
|
`(,@systemd-font-lock-keywords-2
|
||||||
|
("^Type=\\(simple\\|forking\\|oneshot\\|dbus\\|notify\\|idle\\)$"
|
||||||
|
1 'font-lock-builtin-face)
|
||||||
|
(,(rx bol "Restart="
|
||||||
|
(group (or "no" "on-success" "on-failure"
|
||||||
|
"on-abnormal" "on-watchdog" "on-abort" "always"))
|
||||||
|
eol)
|
||||||
|
1 'font-lock-builtin-face)
|
||||||
|
("^KillMode=\\(control-group\\|process\\|mixed\\|none\\)$"
|
||||||
|
1 'font-lock-builtin-face)
|
||||||
|
(,(rx bol "KillSignal="
|
||||||
|
(group
|
||||||
|
(or "SIGHUP" "SIGINT" "SIGQUIT" "SIGILL" "SIGABRT" "SIGFPE" "SIGKILL"
|
||||||
|
"SIGSEGV" "SIGPIPE" "SIGALRM" "SIGTERM" "SIGUSR1" "SIGUSR2"
|
||||||
|
"SIGCHLD" "SIGCONT" "SIGSTOP" "SIGTSTP" "SIGTTIN" "SIGTTOU"))
|
||||||
|
eol)
|
||||||
|
1 'font-lock-constant-face))
|
||||||
|
"Flamboyant expressions to highlight in `systemd-mode'.")
|
||||||
|
|
||||||
|
(defvar systemd-font-lock-keywords 'systemd-font-lock-keywords-2
|
||||||
|
"Default expressions to highlight in `systemd-mode'.
|
||||||
|
See systemd.unit(5) for details on unit file syntax.")
|
||||||
|
|
||||||
(defvar systemd-mode-syntax-table
|
(defvar systemd-mode-syntax-table
|
||||||
(let ((table (make-syntax-table)))
|
(let ((table (make-syntax-table)))
|
||||||
(modify-syntax-entry ?\' "." table)
|
(modify-syntax-entry ?% "/" table)
|
||||||
(modify-syntax-entry ?\" "." table)
|
(modify-syntax-entry ?$ "'" table)
|
||||||
(modify-syntax-entry ?\; " " table)
|
(modify-syntax-entry ?\; "." table)
|
||||||
(modify-syntax-entry ?\n ">" table)
|
|
||||||
(modify-syntax-entry ?\% "\\" table)
|
|
||||||
table)
|
table)
|
||||||
"Syntax table used in `systemd-mode' buffers.")
|
"Syntax table used in `systemd-mode' buffers.")
|
||||||
|
|
||||||
@ -176,23 +388,15 @@ file, defaulting to the link under point, if any."
|
|||||||
["Open systemd.directives(7)" systemd-doc-directives
|
["Open systemd.directives(7)" systemd-doc-directives
|
||||||
:help "Index of configuration directives"]))
|
:help "Index of configuration directives"]))
|
||||||
|
|
||||||
;;;###autoload (add-to-list 'auto-mode-alist '("\\.automount\\'" . systemd-mode))
|
;;;###autoload (add-to-list 'auto-mode-alist '("\\.nspawn\\'" . systemd-mode))
|
||||||
;;;###autoload (add-to-list 'auto-mode-alist '("\\.busname\\'" . systemd-mode))
|
;;;###autoload (add-to-list 'auto-mode-alist `(,systemd-autoload-regexp . systemd-mode))
|
||||||
;;;###autoload (add-to-list 'auto-mode-alist '("\\.mount\\'" . systemd-mode))
|
;;;###autoload (add-to-list 'auto-mode-alist `(,systemd-tempfn-autoload-regexp . systemd-mode))
|
||||||
;;;###autoload (add-to-list 'auto-mode-alist '("\\.service\\'" . systemd-mode))
|
;;;###autoload (add-to-list 'auto-mode-alist `(,systemd-dropin-autoload-regexp . systemd-mode))
|
||||||
;;;###autoload (add-to-list 'auto-mode-alist '("\\.slice\\'" . systemd-mode))
|
|
||||||
;;;###autoload (add-to-list 'auto-mode-alist '("\\.socket\\'" . systemd-mode))
|
|
||||||
;;;###autoload (add-to-list 'auto-mode-alist '("\\.target\\'" . systemd-mode))
|
|
||||||
;;;###autoload (add-to-list 'auto-mode-alist '("\\.timer\\'" . systemd-mode))
|
|
||||||
;;;###autoload (add-to-list 'auto-mode-alist '("\\.link\\'" . systemd-mode))
|
|
||||||
;;;###autoload (add-to-list 'auto-mode-alist '("\\.netdev\\'" . systemd-mode))
|
|
||||||
;;;###autoload (add-to-list 'auto-mode-alist '("\\.network\\'" . systemd-mode))
|
|
||||||
;;;###autoload (add-to-list 'auto-mode-alist '("\\.override\\.conf.*\\'" . systemd-mode))
|
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(define-derived-mode systemd-mode conf-mode "Systemd"
|
(define-derived-mode systemd-mode conf-mode "Systemd"
|
||||||
"Major mode for editing systemd unit files.
|
"Major mode for editing systemd unit files.
|
||||||
See http://www.freedesktop.org/wiki/Software/systemd/ for more
|
See https://www.freedesktop.org/wiki/Software/systemd/ for more
|
||||||
information about systemd.
|
information about systemd.
|
||||||
|
|
||||||
In addition to any hooks its parent mode might have run, this
|
In addition to any hooks its parent mode might have run, this
|
||||||
@ -201,9 +405,17 @@ mode runs the hook `systemd-mode-hook' at mode initialization.
|
|||||||
Key bindings:
|
Key bindings:
|
||||||
\\{systemd-mode-map}"
|
\\{systemd-mode-map}"
|
||||||
(set-keymap-parent systemd-mode-map nil)
|
(set-keymap-parent systemd-mode-map nil)
|
||||||
(systemd-company--setup systemd-use-company-p)
|
|
||||||
(conf-mode-initialize systemd-comment-start)
|
(conf-mode-initialize systemd-comment-start)
|
||||||
(setq-local font-lock-defaults '(systemd-font-lock-keywords)))
|
(setq-local auto-fill-inhibit-regexp "^[ \t]*?[^;#]")
|
||||||
|
(add-hook 'completion-at-point-functions #'systemd-complete-at-point nil t)
|
||||||
|
(add-hook 'font-lock-extend-region-functions
|
||||||
|
'systemd-font-lock-extend-region nil t)
|
||||||
|
(setq-local syntax-propertize-function #'systemd-syntax-propertize)
|
||||||
|
(setq font-lock-defaults
|
||||||
|
'((systemd-font-lock-keywords
|
||||||
|
systemd-font-lock-keywords-1
|
||||||
|
systemd-font-lock-keywords-2
|
||||||
|
systemd-font-lock-keywords-3))))
|
||||||
|
|
||||||
(provide 'systemd)
|
(provide 'systemd)
|
||||||
|
|
||||||
|
|||||||
85
test/systemd-tests.el
Normal file
85
test/systemd-tests.el
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
;;; systemd-tests.el --- Tests for systemd.el -*- lexical-binding: t -*-
|
||||||
|
|
||||||
|
;; Copyright (C) 2016-2020 Mark Oteiza <mvoteiza@udel.edu>
|
||||||
|
|
||||||
|
;; Author: Mark Oteiza <mvoteiza@udel.edu>
|
||||||
|
|
||||||
|
;; This file is free software; you can redistribute it and/or
|
||||||
|
;; modify it under the terms of the GNU General Public License
|
||||||
|
;; as published by the Free Software Foundation; either version 3
|
||||||
|
;; of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
;; This file is distributed in the hope that it will be useful,
|
||||||
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
;; GNU General Public License for more details.
|
||||||
|
|
||||||
|
;; You should have received a copy of the GNU General Public License
|
||||||
|
;; along with this file. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(require 'ert)
|
||||||
|
(require 'systemd)
|
||||||
|
|
||||||
|
(ert-deftest test-normal-autoloads ()
|
||||||
|
"Tests for `systemd-autoload-regexp'.
|
||||||
|
This should match unit names: alpha-numeric ascii base names,
|
||||||
|
with exceptions in the set [-_.@\\]. Extensions are a prescribed
|
||||||
|
list. Some from systemd.unit(5) are excluded intentionally;
|
||||||
|
e.g. scope files which are created programmatically."
|
||||||
|
(let ((re systemd-autoload-regexp))
|
||||||
|
(should (string-match-p re "70-snark-ethernet.link"))
|
||||||
|
(should-not (string-match-p re "abusname"))
|
||||||
|
(should-not (string-match-p re "busname"))
|
||||||
|
;; Do not match empty unit name
|
||||||
|
(should-not (string-match-p re ".service"))
|
||||||
|
;; Non-alphanumeric ASCII exceptions
|
||||||
|
(should (string-match-p re "-.mount"))
|
||||||
|
(should (string-match-p re "dev-dm\\x2d4.service"))
|
||||||
|
(should (string-match-p re "proc-sys-fs-binfmt_misc.automount"))
|
||||||
|
(should (string-match-p re "bitlbee@.service"))
|
||||||
|
(should (string-match-p re "org.freedesktop.timedate1.busname"))
|
||||||
|
;; Do not match non-ASCII
|
||||||
|
(should-not (string-match-p re "割り箸.service"))
|
||||||
|
;; Do not match non-alphanumeric ASCII
|
||||||
|
(should-not (string-match-p re "~.service"))))
|
||||||
|
|
||||||
|
(ert-deftest test-tempfile-autoloads ()
|
||||||
|
"Tests for `systemd-tempfn-autoload-regexp'.
|
||||||
|
Should match file names generated by \"tempfn_random\" in
|
||||||
|
src/basic/fileio.c which, to quote its comments, does the
|
||||||
|
transformation
|
||||||
|
|
||||||
|
/foo/bar/waldo => /foo/bar/.#<extra>waldobaa2a261115984a9
|
||||||
|
|
||||||
|
but not plain unit names. For temp files made from systemctl
|
||||||
|
edit, <extra> is NULL as of systemd 229."
|
||||||
|
(let ((re systemd-tempfn-autoload-regexp))
|
||||||
|
(should-not (string-match-p re "/foo/bar/.#waldobaa2a261115984a9"))
|
||||||
|
(should (string-match-p re ".#override.conf064d87263873e7f7"))
|
||||||
|
(should (string-match-p re ".#FOObar.timer064d87263873e7f7"))
|
||||||
|
;; Do not match just the conf extension or unit names
|
||||||
|
(should-not (string-match-p re "override.conf"))
|
||||||
|
(should-not (string-match-p re "mmmmm.mount"))))
|
||||||
|
|
||||||
|
(ert-deftest test-dropin-autoloads ()
|
||||||
|
"Tests for `systemd-dropin-autoload-regexp'.
|
||||||
|
It should match file names with the \".conf\" extension if and
|
||||||
|
only if in an appropriately named parent directory."
|
||||||
|
(let ((re systemd-dropin-autoload-regexp))
|
||||||
|
(should (string-match-p re "/systemd/dog.socket.d/woof.conf"))
|
||||||
|
(should-not (string-match-p re "foobar.conf"))
|
||||||
|
(should-not (string-match-p re "/etc/modprobe.d/bonding.conf"))
|
||||||
|
(should-not (string-match-p re "/etc/systemd/system.conf"))
|
||||||
|
;; No restrictions on the base name
|
||||||
|
(should (string-match-p re ".config/systemd/user/foo.timer.d/კულტის.conf"))
|
||||||
|
(should (string-match-p re "/etc/systemd/user/c.service.d/a\nb.conf"))
|
||||||
|
;; Do not match inside a subdirectory of foobar.d/
|
||||||
|
(should-not (string-match-p re ".config/systemd/user/foo.timer.d/a/b.conf"))))
|
||||||
|
|
||||||
|
(provide 'systemd-tests)
|
||||||
|
|
||||||
|
;;; systemd-tests.el ends here
|
||||||
360
unit-directives.txt
Normal file
360
unit-directives.txt
Normal file
@ -0,0 +1,360 @@
|
|||||||
|
Accept
|
||||||
|
AccuracySec
|
||||||
|
After
|
||||||
|
Alias
|
||||||
|
AllowIsolate
|
||||||
|
AllowedCPUs
|
||||||
|
AllowedMemoryNodes
|
||||||
|
Also
|
||||||
|
AmbientCapabilities
|
||||||
|
AppArmorProfile
|
||||||
|
AssertACPower
|
||||||
|
AssertArchitecture
|
||||||
|
AssertCapability
|
||||||
|
AssertControlGroupController
|
||||||
|
AssertDirectoryNotEmpty
|
||||||
|
AssertFileIsExecutable
|
||||||
|
AssertFileNotEmpty
|
||||||
|
AssertFirstBoot
|
||||||
|
AssertGroup
|
||||||
|
AssertHost
|
||||||
|
AssertKernelCommandLine
|
||||||
|
AssertKernelVersion
|
||||||
|
AssertNeedsUpdate
|
||||||
|
AssertPathExists
|
||||||
|
AssertPathExistsGlob
|
||||||
|
AssertPathIsDirectory
|
||||||
|
AssertPathIsMountPoint
|
||||||
|
AssertPathIsReadWrite
|
||||||
|
AssertPathIsSymbolicLink
|
||||||
|
AssertSecurity
|
||||||
|
AssertUser
|
||||||
|
AssertVirtualization
|
||||||
|
Backlog
|
||||||
|
Before
|
||||||
|
BindIPv6Only
|
||||||
|
BindPaths
|
||||||
|
BindReadOnlyPaths
|
||||||
|
BindToDevice
|
||||||
|
BindsTo
|
||||||
|
BlockIOAccounting
|
||||||
|
BlockIODeviceWeight
|
||||||
|
BlockIOReadBandwidth
|
||||||
|
BlockIOWeight
|
||||||
|
BlockIOWriteBandwidth
|
||||||
|
Broadcast
|
||||||
|
BusName
|
||||||
|
CPUAccounting
|
||||||
|
CPUAffinity
|
||||||
|
CPUQuota
|
||||||
|
CPUQuotaPeriodSec
|
||||||
|
CPUSchedulingPolicy
|
||||||
|
CPUSchedulingPriority
|
||||||
|
CPUSchedulingResetOnFork
|
||||||
|
CPUShares
|
||||||
|
CPUWeight
|
||||||
|
CacheDirectory
|
||||||
|
CacheDirectoryMode
|
||||||
|
CapabilityBoundingSet
|
||||||
|
CollectMode
|
||||||
|
ConditionACPower
|
||||||
|
ConditionArchitecture
|
||||||
|
ConditionCPUs
|
||||||
|
ConditionCapability
|
||||||
|
ConditionControlGroupController
|
||||||
|
ConditionDirectoryNotEmpty
|
||||||
|
ConditionFileIsExecutable
|
||||||
|
ConditionFileNotEmpty
|
||||||
|
ConditionFirstBoot
|
||||||
|
ConditionGroup
|
||||||
|
ConditionHost
|
||||||
|
ConditionKernelCommandLine
|
||||||
|
ConditionKernelVersion
|
||||||
|
ConditionMemory
|
||||||
|
ConditionNeedsUpdate
|
||||||
|
ConditionPathExists
|
||||||
|
ConditionPathExistsGlob
|
||||||
|
ConditionPathIsDirectory
|
||||||
|
ConditionPathIsMountPoint
|
||||||
|
ConditionPathIsReadWrite
|
||||||
|
ConditionPathIsSymbolicLink
|
||||||
|
ConditionSecurity
|
||||||
|
ConditionUser
|
||||||
|
ConditionVirtualization
|
||||||
|
ConfigurationDirectory
|
||||||
|
ConfigurationDirectoryMode
|
||||||
|
Conflicts
|
||||||
|
DefaultDependencies
|
||||||
|
DefaultInstance
|
||||||
|
DeferAcceptSec
|
||||||
|
Delegate
|
||||||
|
Description
|
||||||
|
DeviceAllow
|
||||||
|
DevicePolicy
|
||||||
|
DirectoryMode
|
||||||
|
DirectoryNotEmpty
|
||||||
|
DisableControllers
|
||||||
|
Documentation
|
||||||
|
DynamicUser
|
||||||
|
Environment
|
||||||
|
EnvironmentFile
|
||||||
|
ExecCondition
|
||||||
|
ExecReload
|
||||||
|
ExecStart
|
||||||
|
ExecStartPost
|
||||||
|
ExecStartPre
|
||||||
|
ExecStop
|
||||||
|
ExecStopPost
|
||||||
|
ExecStopPre
|
||||||
|
FailureAction
|
||||||
|
FailureActionExitStatus
|
||||||
|
FileDescriptorName
|
||||||
|
FileDescriptorStoreMax
|
||||||
|
FinalKillSignal
|
||||||
|
ForceUnmount
|
||||||
|
FreeBind
|
||||||
|
Group
|
||||||
|
GuessMainPID
|
||||||
|
IOAccounting
|
||||||
|
IODeviceLatencyTargetSec
|
||||||
|
IODeviceWeight
|
||||||
|
IOReadBandwidthMax
|
||||||
|
IOReadIOPSMax
|
||||||
|
IOSchedulingClass
|
||||||
|
IOSchedulingPriority
|
||||||
|
IOWeight
|
||||||
|
IOWriteBandwidthMax
|
||||||
|
IOWriteIOPSMax
|
||||||
|
IPAccounting
|
||||||
|
IPAddressAllow
|
||||||
|
IPAddressDeny
|
||||||
|
IPEgressFilterPath
|
||||||
|
IPIngressFilterPath
|
||||||
|
IPTOS
|
||||||
|
IPTTL
|
||||||
|
IgnoreOnIsolate
|
||||||
|
IgnoreSIGPIPE
|
||||||
|
InaccessiblePaths
|
||||||
|
JobRunningTimeoutSec
|
||||||
|
JobTimeoutAction
|
||||||
|
JobTimeoutRebootArgument
|
||||||
|
JobTimeoutSec
|
||||||
|
JoinsNamespaceOf
|
||||||
|
KeepAlive
|
||||||
|
KeepAliveIntervalSec
|
||||||
|
KeepAliveProbes
|
||||||
|
KeepAliveTimeSec
|
||||||
|
KeyringMode
|
||||||
|
KillMode
|
||||||
|
KillSignal
|
||||||
|
LazyUnmount
|
||||||
|
LimitAS
|
||||||
|
LimitCORE
|
||||||
|
LimitCPU
|
||||||
|
LimitDATA
|
||||||
|
LimitFSIZE
|
||||||
|
LimitLOCKS
|
||||||
|
LimitMEMLOCK
|
||||||
|
LimitMSGQUEUE
|
||||||
|
LimitNICE
|
||||||
|
LimitNOFILE
|
||||||
|
LimitNPROC
|
||||||
|
LimitRSS
|
||||||
|
LimitRTPRIO
|
||||||
|
LimitRTTIME
|
||||||
|
LimitSIGPENDING
|
||||||
|
LimitSTACK
|
||||||
|
ListenDatagram
|
||||||
|
ListenFIFO
|
||||||
|
ListenMessageQueue
|
||||||
|
ListenNetlink
|
||||||
|
ListenSequentialPacket
|
||||||
|
ListenSpecial
|
||||||
|
ListenStream
|
||||||
|
ListenUSBFunction
|
||||||
|
LockPersonality
|
||||||
|
LogExtraFields
|
||||||
|
LogLevelMax
|
||||||
|
LogRateLimitBurst
|
||||||
|
LogRateLimitIntervalSec
|
||||||
|
LogsDirectory
|
||||||
|
LogsDirectoryMode
|
||||||
|
MakeDirectory
|
||||||
|
Mark
|
||||||
|
MaxConnections
|
||||||
|
MaxConnectionsPerSource
|
||||||
|
MemoryAccounting
|
||||||
|
MemoryDenyWriteExecute
|
||||||
|
MemoryHigh
|
||||||
|
MemoryLimit
|
||||||
|
MemoryLow
|
||||||
|
MemoryMax
|
||||||
|
MemoryMin
|
||||||
|
MemorySwapMax
|
||||||
|
MessageQueueMaxMessages
|
||||||
|
MessageQueueMessageSize
|
||||||
|
MountAPIVFS
|
||||||
|
MountFlags
|
||||||
|
NUMAMask
|
||||||
|
NUMAPolicy
|
||||||
|
NetworkNamespacePath
|
||||||
|
Nice
|
||||||
|
NoDelay
|
||||||
|
NoNewPrivileges
|
||||||
|
NonBlocking
|
||||||
|
NotifyAccess
|
||||||
|
OOMPolicy
|
||||||
|
OOMScoreAdjust
|
||||||
|
OnActiveSec
|
||||||
|
OnBootSec
|
||||||
|
OnCalendar
|
||||||
|
OnClockChange
|
||||||
|
OnFailure
|
||||||
|
OnFailureJobMode
|
||||||
|
OnStartupSec
|
||||||
|
OnTimezoneChange
|
||||||
|
OnUnitActiveSec
|
||||||
|
OnUnitInactiveSec
|
||||||
|
Options
|
||||||
|
PAMName
|
||||||
|
PIDFile
|
||||||
|
PartOf
|
||||||
|
PassCredentials
|
||||||
|
PassEnvironment
|
||||||
|
PassSecurity
|
||||||
|
PathChanged
|
||||||
|
PathExists
|
||||||
|
PathExistsGlob
|
||||||
|
PathModified
|
||||||
|
Persistent
|
||||||
|
Personality
|
||||||
|
PipeSize
|
||||||
|
Priority
|
||||||
|
PrivateDevices
|
||||||
|
PrivateMounts
|
||||||
|
PrivateNetwork
|
||||||
|
PrivateTmp
|
||||||
|
PrivateUsers
|
||||||
|
PropagatesReloadTo
|
||||||
|
ProtectControlGroups
|
||||||
|
ProtectHome
|
||||||
|
ProtectHostname
|
||||||
|
ProtectKernelLogs
|
||||||
|
ProtectKernelModules
|
||||||
|
ProtectKernelTunables
|
||||||
|
ProtectSystem
|
||||||
|
RandomizedDelaySec
|
||||||
|
ReadOnlyPaths
|
||||||
|
ReadWritePaths
|
||||||
|
RebootArgument
|
||||||
|
ReceiveBuffer
|
||||||
|
RefuseManualStart
|
||||||
|
RefuseManualStop
|
||||||
|
ReloadPropagatedFrom
|
||||||
|
RemainAfterElapse
|
||||||
|
RemainAfterExit
|
||||||
|
RemoveIPC
|
||||||
|
RemoveOnStop
|
||||||
|
RequiredBy
|
||||||
|
Requires
|
||||||
|
RequiresMountsFor
|
||||||
|
Requisite
|
||||||
|
Restart
|
||||||
|
RestartForceExitStatus
|
||||||
|
RestartKillSignal
|
||||||
|
RestartPreventExitStatus
|
||||||
|
RestartSec
|
||||||
|
RestrictAddressFamilies
|
||||||
|
RestrictNamespaces
|
||||||
|
RestrictRealtime
|
||||||
|
RestrictSUIDSGID
|
||||||
|
ReusePort
|
||||||
|
RootDirectory
|
||||||
|
RootDirectoryStartOnly
|
||||||
|
RootImage
|
||||||
|
RuntimeDirectory
|
||||||
|
RuntimeDirectoryMode
|
||||||
|
RuntimeDirectoryPreserve
|
||||||
|
RuntimeMaxSec
|
||||||
|
SELinuxContext
|
||||||
|
SELinuxContextFromNet
|
||||||
|
SecureBits
|
||||||
|
SendBuffer
|
||||||
|
SendSIGHUP
|
||||||
|
SendSIGKILL
|
||||||
|
Service
|
||||||
|
Slice
|
||||||
|
SloppyOptions
|
||||||
|
SmackLabel
|
||||||
|
SmackLabelIPIn
|
||||||
|
SmackLabelIPOut
|
||||||
|
SmackProcessLabel
|
||||||
|
SocketGroup
|
||||||
|
SocketMode
|
||||||
|
SocketProtocol
|
||||||
|
SocketUser
|
||||||
|
Sockets
|
||||||
|
SourcePath
|
||||||
|
StandardError
|
||||||
|
StandardInput
|
||||||
|
StandardInputData
|
||||||
|
StandardInputText
|
||||||
|
StandardOutput
|
||||||
|
StartLimitAction
|
||||||
|
StartLimitBurst
|
||||||
|
StartLimitIntervalSec
|
||||||
|
StartupBlockIOWeight
|
||||||
|
StartupCPUShares
|
||||||
|
StartupCPUWeight
|
||||||
|
StartupIOWeight
|
||||||
|
StateDirectory
|
||||||
|
StateDirectoryMode
|
||||||
|
StopWhenUnneeded
|
||||||
|
SuccessAction
|
||||||
|
SuccessActionExitStatus
|
||||||
|
SuccessExitStatus
|
||||||
|
SupplementaryGroups
|
||||||
|
Symlinks
|
||||||
|
SyslogFacility
|
||||||
|
SyslogIdentifier
|
||||||
|
SyslogLevel
|
||||||
|
SyslogLevelPrefix
|
||||||
|
SystemCallArchitectures
|
||||||
|
SystemCallErrorNumber
|
||||||
|
SystemCallFilter
|
||||||
|
TCPCongestion
|
||||||
|
TTYPath
|
||||||
|
TTYReset
|
||||||
|
TTYVHangup
|
||||||
|
TTYVTDisallocate
|
||||||
|
TasksAccounting
|
||||||
|
TasksMax
|
||||||
|
TemporaryFileSystem
|
||||||
|
TimeoutAbortSec
|
||||||
|
TimeoutCleanSec
|
||||||
|
TimeoutIdleSec
|
||||||
|
TimeoutSec
|
||||||
|
TimeoutStartSec
|
||||||
|
TimeoutStopSec
|
||||||
|
TimerSlackNSec
|
||||||
|
Transparent
|
||||||
|
TriggerLimitBurst
|
||||||
|
TriggerLimitIntervalSec
|
||||||
|
Type
|
||||||
|
UMask
|
||||||
|
USBFunctionDescriptors
|
||||||
|
USBFunctionStrings
|
||||||
|
Unit
|
||||||
|
UnsetEnvironment
|
||||||
|
User
|
||||||
|
UtmpIdentifier
|
||||||
|
UtmpMode
|
||||||
|
WakeSystem
|
||||||
|
WantedBy
|
||||||
|
Wants
|
||||||
|
WatchdogSec
|
||||||
|
WatchdogSignal
|
||||||
|
What
|
||||||
|
Where
|
||||||
|
WorkingDirectory
|
||||||
|
Writable
|
||||||
Loading…
x
Reference in New Issue
Block a user