├── .gitignore ├── .travis.yml ├── Cargo.toml ├── LICENSE ├── README.md ├── appveyor.yml ├── ci ├── before_deploy.ps1 ├── before_deploy.sh ├── install.sh └── script.sh ├── crates └── systemd-parser │ ├── Cargo.toml │ ├── LICENSE │ ├── README.md │ ├── src │ ├── errors.rs │ ├── items.rs │ ├── items_test.rs │ ├── lib.rs │ ├── parser.rs │ └── parser_test.rs │ └── tests │ ├── parser_sanity.rs │ └── success_units │ ├── -.slice │ ├── 10-oem.conf │ ├── addon-config@.service │ ├── addon-run@.service │ ├── audit-rules.service │ ├── auth-rpcgss-module.service │ ├── autovt@.service │ ├── basic.target │ ├── blk-availability.service │ ├── bluetooth.target │ ├── boot.automount │ ├── boot.mount │ ├── busnames.target │ ├── busnames.target.wants │ ├── org.freedesktop.hostname1.busname │ ├── org.freedesktop.import1.busname │ ├── org.freedesktop.locale1.busname │ ├── org.freedesktop.login1.busname │ ├── org.freedesktop.machine1.busname │ ├── org.freedesktop.network1.busname │ ├── org.freedesktop.resolve1.busname │ ├── org.freedesktop.systemd1.busname │ └── org.freedesktop.timedate1.busname │ ├── clean-ca-certificates.service │ ├── console-getty.service │ ├── console-shell.service │ ├── container-getty@.service │ ├── containerd.service │ ├── coreos-metadata-sshkeys@.service │ ├── coreos-metadata.service │ ├── coreos-setup-environment.service │ ├── coreos-tmpfiles.service │ ├── cryptsetup-pre.target │ ├── cryptsetup.target │ ├── ctrl-alt-del.target │ ├── dbus-org.freedesktop.hostname1.service │ ├── dbus-org.freedesktop.import1.service │ ├── dbus-org.freedesktop.locale1.service │ ├── dbus-org.freedesktop.login1.service │ ├── dbus-org.freedesktop.machine1.service │ ├── dbus-org.freedesktop.network1.service │ ├── dbus-org.freedesktop.resolve1.service │ ├── dbus-org.freedesktop.timedate1.service │ ├── dbus.service │ ├── dbus.socket │ ├── dbus.target.wants │ └── dbus.socket │ ├── debug-shell.service │ ├── default.target │ ├── default.target.wants │ ├── system-config.target │ └── user-config.target │ ├── dev-hugepages.mount │ ├── dev-mqueue.mount │ ├── dhcpcd.service │ ├── dm-event.service │ ├── dm-event.socket │ ├── docker.service │ ├── docker.socket │ ├── early-docker.service │ ├── early-docker.socket │ ├── early-docker.target │ ├── emergency.service │ ├── emergency.target │ ├── etcd-member.service │ ├── etcd.service │ ├── etcd2.service │ ├── exit.target │ ├── extend-filesystems.service │ ├── final.target │ ├── flannel-docker-opts.service │ ├── flanneld.service │ ├── fleet.service │ ├── fleet.socket │ ├── fleet_unit_file.service │ ├── fstrim.service │ ├── fstrim.timer │ ├── getty.target │ ├── getty.target.wants │ └── getty@tty1.service │ ├── getty@.service │ ├── git-daemon.socket │ ├── git-daemon@.service │ ├── graphical.target │ ├── halt.target │ ├── hibernate.target │ ├── hybrid-sleep.target │ ├── initrd-cleanup.service │ ├── initrd-fs.target │ ├── initrd-parse-etc.service │ ├── initrd-root-device.target │ ├── initrd-root-fs.target │ ├── initrd-switch-root.service │ ├── initrd-switch-root.target │ ├── initrd-udevadm-cleanup-db.service │ ├── initrd.target │ ├── ip6tables-restore.service │ ├── ip6tables-store.service │ ├── ip6tables.service │ ├── iptables-restore.service │ ├── iptables-store.service │ ├── iptables.service │ ├── iscsid-initiatorname.service │ ├── iscsid.service │ ├── iscsid.socket │ ├── issuegen.service │ ├── kexec.target │ ├── kmod-static-nodes.service │ ├── ldconfig.service │ ├── local-fs-pre.target │ ├── local-fs-pre.target.wants │ └── setup-nsswitch.service │ ├── local-fs.target │ ├── local-fs.target.wants │ ├── boot.automount │ ├── media.mount │ ├── proc-xen.mount │ ├── remount-root.service │ ├── systemd-remount-fs.service │ ├── tmp.mount │ ├── usr-share-oem.mount │ └── var-lib-machines.mount │ ├── locksmithd.service │ ├── logrotate.service │ ├── logrotate.timer │ ├── lvm2-activation-early.service │ ├── lvm2-activation-net.service │ ├── lvm2-activation.service │ ├── lvm2-lvmetad.service │ ├── lvm2-lvmetad.socket │ ├── lvm2-monitor.service │ ├── lvm2-pvscan@.service │ ├── machine.slice │ ├── machines.target │ ├── mcstrans.service │ ├── mdadm-grow-continue@.service │ ├── mdadm-last-resort@.service │ ├── mdadm-last-resort@.timer │ ├── mdmon@.service │ ├── mdmonitor.service │ ├── media-configdrive.mount │ ├── media-configvirtfs.mount │ ├── media-ovfenv.mount │ ├── media.mount │ ├── motdgen.path │ ├── motdgen.service │ ├── multi-user.target │ ├── multi-user.target.wants │ ├── audit-rules.service │ ├── dbus.service │ ├── extend-filesystems.service │ ├── getty.target │ ├── issuegen.service │ ├── locksmithd.service │ ├── logrotate.timer │ ├── motdgen.path │ ├── motdgen.service │ ├── remote-fs.target │ ├── rkt-gc.timer │ ├── ssh-key-proc-cmdline.service │ ├── sshd-keygen.service │ ├── systemd-ask-password-wall.path │ ├── systemd-logind.service │ ├── systemd-networkd.service │ ├── systemd-resolved.service │ ├── systemd-user-sessions.service │ ├── tcsd.service │ ├── update-engine-stub.timer │ └── update-engine.service │ ├── multipathd.service │ ├── multipathd.socket │ ├── network-online.target │ ├── network-online.target.wants │ └── systemd-networkd-wait-online.service │ ├── network-pre.target │ ├── network.target │ ├── nfs-client.target │ ├── nfs-idmapd.service │ ├── nfs-mountd.service │ ├── nfs-server.service │ ├── nfs-utils.service │ ├── nfsd.service │ ├── nss-lookup.target │ ├── nss-user-lookup.target │ ├── ntpd.service │ ├── ntpdate.service │ ├── oem-cloudinit.service │ ├── paths.target │ ├── polkit.service │ ├── poweroff.target │ ├── printer.target │ ├── proc-fs-nfsd.mount │ ├── proc-sys-fs-binfmt_misc.automount │ ├── proc-sys-fs-binfmt_misc.mount │ ├── proc-xen.mount │ ├── pwcheck.service │ ├── quotaon.service │ ├── realmd.service │ ├── reboot.target │ ├── remote-fs-pre.target │ ├── remote-fs.target │ ├── remount-root.service │ ├── remount-usr.service │ ├── rescue.service │ ├── rescue.target │ ├── rkt-gc.service │ ├── rkt-gc.timer │ ├── rkt-metadata.service │ ├── rkt-metadata.socket │ ├── rngd.service │ ├── rpc-idmapd.service │ ├── rpc-mountd.service │ ├── rpc-statd-notify.service │ ├── rpc-statd.service │ ├── rpcbind.service │ ├── rpcbind.target │ ├── rpcbind.target.wants │ └── rpcbind.service │ ├── rsyncd.service │ ├── saslauthd.service │ ├── serial-getty@.service │ ├── serial-getty@ttyS0.service │ ├── setup-nsswitch.service │ ├── shutdown.target │ ├── sigpwr.target │ ├── sleep.target │ ├── slices.target │ ├── smartcard.target │ ├── sntp.service │ ├── sockets.target │ ├── sockets.target.wants │ ├── dbus.socket │ ├── docker.socket │ ├── rkt-metadata.socket │ ├── sshd.socket │ ├── systemd-coredump.socket │ ├── systemd-initctl.socket │ ├── systemd-journald-audit.socket │ ├── systemd-journald-dev-log.socket │ ├── systemd-journald.socket │ ├── systemd-networkd.socket │ ├── systemd-udevd-control.socket │ └── systemd-udevd-kernel.socket │ ├── sound.target │ ├── ssh-key-proc-cmdline.service │ ├── sshd-keygen.service │ ├── sshd.service │ ├── sshd.socket │ ├── sshd@.service │ ├── sshd@.service.d │ └── sshd-keygen.conf │ ├── sssd.service │ ├── suspend.target │ ├── swap.target │ ├── sys-fs-fuse-connections.mount │ ├── sys-kernel-config.mount │ ├── sys-kernel-debug.mount │ ├── sysinit.target │ ├── sysinit.target.wants │ ├── clean-ca-certificates.service │ ├── coreos-tmpfiles.service │ ├── cryptsetup.target │ ├── dev-hugepages.mount │ ├── dev-mqueue.mount │ ├── kmod-static-nodes.service │ ├── ldconfig.service │ ├── proc-sys-fs-binfmt_misc.automount │ ├── sys-fs-fuse-connections.mount │ ├── sys-kernel-config.mount │ ├── sys-kernel-debug.mount │ ├── systemd-ask-password-console.path │ ├── systemd-binfmt.service │ ├── systemd-hwdb-update.service │ ├── systemd-journal-catalog-update.service │ ├── systemd-journal-flush.service │ ├── systemd-journald.service │ ├── systemd-machine-id-commit.service │ ├── systemd-modules-load.service │ ├── systemd-random-seed.service │ ├── systemd-sysctl.service │ ├── systemd-sysusers.service │ ├── systemd-timesyncd.service │ ├── systemd-tmpfiles-setup-dev.service │ ├── systemd-tmpfiles-setup.service │ ├── systemd-udev-trigger.service │ ├── systemd-udevd.service │ ├── systemd-update-done.service │ ├── systemd-update-utmp.service │ ├── systemd-vconsole-setup.service │ ├── update-ca-certificates.service │ └── xenserver-pv-version.service │ ├── syslog.socket │ ├── system-cloudinit@.service │ ├── system-config.target │ ├── system-update.target │ ├── system.slice │ ├── systemd-ask-password-console.path │ ├── systemd-ask-password-console.service │ ├── systemd-ask-password-wall.path │ ├── systemd-ask-password-wall.service │ ├── systemd-backlight@.service │ ├── systemd-binfmt.service │ ├── systemd-bootchart.service │ ├── systemd-bus-proxyd.service │ ├── systemd-bus-proxyd.socket │ ├── systemd-coredump.socket │ ├── systemd-coredump@.service │ ├── systemd-exit.service │ ├── systemd-firstboot.service │ ├── systemd-fsck-root.service │ ├── systemd-fsck@.service │ ├── systemd-halt.service │ ├── systemd-hibernate-resume@.service │ ├── systemd-hibernate.service │ ├── systemd-hostnamed.service │ ├── systemd-hwdb-update.service │ ├── systemd-hybrid-sleep.service │ ├── systemd-importd.service │ ├── systemd-initctl.service │ ├── systemd-initctl.socket │ ├── systemd-journal-catalog-update.service │ ├── systemd-journal-flush.service │ ├── systemd-journal-gatewayd.service │ ├── systemd-journal-gatewayd.socket │ ├── systemd-journal-remote.service │ ├── systemd-journal-remote.socket │ ├── systemd-journal-upload.service │ ├── systemd-journald-audit.socket │ ├── systemd-journald-dev-log.socket │ ├── systemd-journald.service │ ├── systemd-journald.socket │ ├── systemd-kexec.service │ ├── systemd-localed.service │ ├── systemd-logind.service │ ├── systemd-machine-id-commit.service │ ├── systemd-machined.service │ ├── systemd-modules-load.service │ ├── systemd-networkd-wait-online.service │ ├── systemd-networkd.service │ ├── systemd-networkd.socket │ ├── systemd-nspawn@.service │ ├── systemd-poweroff.service │ ├── systemd-quotacheck.service │ ├── systemd-random-seed.service │ ├── systemd-reboot.service │ ├── systemd-remount-fs.service │ ├── systemd-resolved.service │ ├── systemd-rfkill.service │ ├── systemd-rfkill.socket │ ├── systemd-suspend.service │ ├── systemd-sysctl.service │ ├── systemd-sysusers.service │ ├── systemd-timedated.service │ ├── systemd-timesyncd.service │ ├── systemd-tmpfiles-clean.service │ ├── systemd-tmpfiles-clean.timer │ ├── systemd-tmpfiles-setup-dev.service │ ├── systemd-tmpfiles-setup.service │ ├── systemd-udev-settle.service │ ├── systemd-udev-trigger.service │ ├── systemd-udevd-control.socket │ ├── systemd-udevd-kernel.socket │ ├── systemd-udevd.service │ ├── systemd-update-done.service │ ├── systemd-update-utmp-runlevel.service │ ├── systemd-update-utmp.service │ ├── systemd-user-sessions.service │ ├── systemd-vconsole-setup.service │ ├── tcsd.service │ ├── time-sync.target │ ├── timers.target │ ├── timers.target.wants │ └── systemd-tmpfiles-clean.timer │ ├── tmp.mount │ ├── tpmd.service │ ├── umount.target │ ├── update-ca-certificates.service │ ├── update-engine-stub.service │ ├── update-engine-stub.timer │ ├── update-engine.service │ ├── user-cloudinit-proc-cmdline.service │ ├── user-cloudinit@.path │ ├── user-cloudinit@.service │ ├── user-config-ovfenv.service │ ├── user-config.target │ ├── user-configdrive.service │ ├── user-configvirtfs.service │ ├── user.slice │ ├── user@.service │ ├── usr-share-oem.mount │ ├── uuidd.service │ ├── uuidd.socket │ ├── var-lib-machines.mount │ ├── var-lib-nfs-rpc_pipefs.mount │ ├── virtfs@.service │ └── xenserver-pv-version.service └── src ├── lint ├── dbus_missing_bus_name_directive.rs ├── directives.json ├── lint_missing_description.rs ├── mod.rs ├── service_execstart_not_set.rs ├── service_type_always_explicit.rs ├── unknown_category.rs └── unknown_directive.rs ├── main.rs └── support.rs /.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | Cargo.lock 3 | .ruby-version 4 | check.sh 5 | coreos/* 6 | darwin-systemd-linter 7 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "systemd-linter" 3 | description = "A SystemD unit files linter" 4 | version = "0.1.4" 5 | authors = ["Thomas Wickham "] 6 | license = "MPL-2.0" 7 | 8 | [dependencies] 9 | systemd-parser = { version = "^0.1", path = "./crates/systemd-parser" } 10 | clap = "^2.20" 11 | colored = "^1.0" 12 | rustc-serialize = "^0.3" 13 | clippy = {version = "*", optional = true} 14 | 15 | [features] 16 | default = [] 17 | 18 | -------------------------------------------------------------------------------- /ci/before_deploy.ps1: -------------------------------------------------------------------------------- 1 | # This script takes care of packaging the build artifacts that will go in the 2 | # release zipfile 3 | 4 | $SRC_DIR = $PWD.Path 5 | $STAGE = [System.Guid]::NewGuid().ToString() 6 | 7 | Set-Location $ENV:Temp 8 | New-Item -Type Directory -Name $STAGE 9 | Set-Location $STAGE 10 | 11 | $ZIP = "$SRC_DIR\$($Env:CRATE_NAME)-$($Env:APPVEYOR_REPO_TAG_NAME)-$($Env:TARGET).zip" 12 | 13 | Copy-Item "$SRC_DIR\target\$($Env:TARGET)\release\systemd-linter.exe" '.\' 14 | 15 | 7z a "$ZIP" * 16 | 17 | Push-AppveyorArtifact "$ZIP" 18 | 19 | Remove-Item *.* -Force 20 | Set-Location .. 21 | Remove-Item $STAGE 22 | Set-Location $SRC_DIR 23 | -------------------------------------------------------------------------------- /ci/before_deploy.sh: -------------------------------------------------------------------------------- 1 | # This script takes care of building your crate and packaging it for release 2 | 3 | set -ex 4 | 5 | main() { 6 | local src=$(pwd) \ 7 | stage= 8 | 9 | case $TRAVIS_OS_NAME in 10 | linux) 11 | stage=$(mktemp -d) 12 | ;; 13 | osx) 14 | stage=$(mktemp -d -t tmp) 15 | ;; 16 | esac 17 | 18 | test -f Cargo.lock || cargo generate-lockfile 19 | 20 | # TODO Update this to build the artifacts that matter to you 21 | cross rustc --bin systemd-linter --target $TARGET --release -- -C lto 22 | 23 | # TODO Update this to package the right artifacts 24 | cp target/$TARGET/release/systemd-linter $stage/ 25 | 26 | cd $stage 27 | tar czf $src/$CRATE_NAME-$TRAVIS_TAG-$TARGET.tar.gz * 28 | cd $src 29 | 30 | rm -rf $stage 31 | } 32 | 33 | main 34 | -------------------------------------------------------------------------------- /ci/install.sh: -------------------------------------------------------------------------------- 1 | set -ex 2 | 3 | main() { 4 | curl https://sh.rustup.rs -sSf | \ 5 | sh -s -- -y --default-toolchain $TRAVIS_RUST_VERSION 6 | 7 | local target= 8 | if [ $TRAVIS_OS_NAME = linux ]; then 9 | target=x86_64-unknown-linux-gnu 10 | else 11 | target=x86_64-apple-darwin 12 | fi 13 | 14 | # TODO At some point you'll probably want to use a newer release of `cross`, 15 | # simply change the argument to `--tag`. 16 | curl -LSfs https://japaric.github.io/trust/install.sh | \ 17 | sh -s -- \ 18 | --force \ 19 | --git japaric/cross \ 20 | --tag v0.1.4 \ 21 | --target $target 22 | } 23 | 24 | main 25 | -------------------------------------------------------------------------------- /ci/script.sh: -------------------------------------------------------------------------------- 1 | # This script takes care of testing your crate 2 | 3 | set -ex 4 | 5 | # TODO This is the "test phase", tweak it as you see fit 6 | main() { 7 | cross build --target $TARGET 8 | cross build --target $TARGET --release 9 | 10 | if [[ $DISABLE_TESTS = "1" ]]; then 11 | return 12 | fi 13 | 14 | for subcrate in crates/* 15 | do 16 | cd $subcrate 17 | cross test --target $TARGET 18 | cross test --target $TARGET --release 19 | cd - 20 | done 21 | 22 | cross test --target $TARGET 23 | cross test --target $TARGET --release 24 | 25 | cross run --target $TARGET -- --help 26 | cross run --target $TARGET --release -- --help 27 | } 28 | 29 | # we don't run the "test phase" when doing deploys 30 | if [ -z $TRAVIS_TAG ]; then 31 | main 32 | fi 33 | -------------------------------------------------------------------------------- /crates/systemd-parser/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "systemd-parser" 3 | description = "A nom parser for systemd unit files" 4 | version = "0.1.3" 5 | authors = ["Thomas Wickham "] 6 | license = "MPL-2.0" 7 | 8 | [dependencies] 9 | quick-error = "^1.1" 10 | itertools = "^0.5" 11 | 12 | [dependencies.nom] 13 | version = "^2.0" 14 | features = ["verbose-errors"] 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /crates/systemd-parser/README.md: -------------------------------------------------------------------------------- 1 | # systemd-parser 2 | 3 | A nom parser for SystemD unit files. 4 | 5 | This is a support crate for [Systemd-linter](https://github.com/mackwic/systemd-linter) 6 | 7 | -------------------------------------------------------------------------------- /crates/systemd-parser/src/lib.rs: -------------------------------------------------------------------------------- 1 | 2 | #![allow(dead_code)] 3 | 4 | extern crate itertools; 5 | #[macro_use] 6 | extern crate nom; 7 | #[macro_use] 8 | extern crate quick_error; 9 | 10 | pub mod errors; 11 | pub mod items; 12 | pub mod parser; 13 | 14 | #[cfg(test)] 15 | mod parser_test; 16 | #[cfg(test)] 17 | mod items_test; 18 | 19 | pub fn parse_string(input: &str) -> Result { 20 | 21 | // FIXME: this should be inside `parse_unit` but then, the lifetime would be wrong 22 | let input = String::from(input).replace("\\\n", ""); 23 | let units = try!(parser::parse_unit(&input)); 24 | let systemd_unit = try!(items::SystemdUnit::new(&units)); 25 | Ok(systemd_unit) 26 | } 27 | 28 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/parser_sanity.rs: -------------------------------------------------------------------------------- 1 | 2 | extern crate systemd_parser; 3 | 4 | use std::fs; 5 | use std::io::Read; 6 | 7 | #[test] 8 | fn it_should_parse_all_example_files_with_no_error() { 9 | 10 | let entries = fs::read_dir("./tests/success_units/").expect("directory exists"); 11 | for entry in entries { 12 | let entry = entry.expect("entry is ok"); 13 | let path = entry.path(); 14 | 15 | if !path.is_file() { 16 | continue; 17 | } 18 | 19 | println!("Reading {}", path.to_str().unwrap()); 20 | 21 | let mut f = fs::File::open(path).expect("file must be open-able"); 22 | let mut buffer = String::with_capacity(4096); 23 | f.read_to_string(&mut buffer).expect("file must be readable"); 24 | 25 | systemd_parser::parse_string(&buffer).expect("should be ok"); 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/-.slice: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Root Slice 10 | Documentation=man:systemd.special(7) 11 | DefaultDependencies=no 12 | Before=slices.target 13 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/10-oem.conf: -------------------------------------------------------------------------------- 1 | [Service] 2 | Environment=ETCD_ELECTION_TIMEOUT=1200 3 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/addon-config@.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Configure Addon /%I 3 | ConditionPathExists=|/%I/authorized_keys 4 | 5 | [Service] 6 | Type=oneshot 7 | ExecStart=/usr/lib/coreos/addon_config /%I 8 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/addon-run@.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Run Addon /%I 3 | ConditionFileIsExecutable=|/%I/run 4 | ConditionFileIsExecutable=|/%I/run.sh 5 | 6 | [Service] 7 | Type=oneshot 8 | ExecStart=/usr/lib/coreos/addon_run /%I 9 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/audit-rules.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Load Security Auditing Rules 3 | DefaultDependencies=no 4 | After=local-fs.target systemd-tmpfiles-setup.service 5 | Conflicts=shutdown.target 6 | Before=sysinit.target shutdown.target 7 | ConditionSecurity=audit 8 | 9 | [Service] 10 | Type=oneshot 11 | RemainAfterExit=yes 12 | ExecStart=/sbin/augenrules --load 13 | ExecStop=-/sbin/auditctl -D 14 | 15 | [Install] 16 | WantedBy=multi-user.target 17 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/auth-rpcgss-module.service: -------------------------------------------------------------------------------- 1 | # We want to start gss-proxy on kernels that support it and rpc.svcgssd 2 | # on those that don't. Those services check for support by checking 3 | # for existence of the path /proc/net/rpc/use-gss-proxy. Before they 4 | # can perform that check, they need this module loaded. (Unless 5 | # rpcsec_gss support is built directly into the kernel, in which case this 6 | # unit will fail. But that's OK.) 7 | [Unit] 8 | Description=Kernel Module supporting RPCSEC_GSS 9 | Before=gssproxy.service rpc-svcgssd.service rpc-gssd.service 10 | Wants=gssproxy.service rpc-svcgssd.service rpc-gssd.service 11 | ConditionPathExists=/etc/krb5.keytab 12 | 13 | [Service] 14 | Type=oneshot 15 | ExecStart=/sbin/modprobe -q auth_rpcgss 16 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/blk-availability.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Availability of block devices 3 | After=lvm2-activation.service lvm2-lvmetad.service iscsi.service iscsid.service fcoe.service 4 | DefaultDependencies=no 5 | Conflicts=shutdown.target 6 | 7 | [Service] 8 | Type=oneshot 9 | ExecStart=/bin/true 10 | ExecStop=/sbin/blkdeactivate -u -l wholevg 11 | RemainAfterExit=yes 12 | 13 | [Install] 14 | WantedBy=sysinit.target 15 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/bluetooth.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Bluetooth 10 | Documentation=man:systemd.special(7) 11 | StopWhenUnneeded=yes 12 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/boot.automount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Boot partition Automount Point 3 | DefaultDependencies=no 4 | Before=sysinit.target 5 | ConditionVirtualization=!container 6 | ConditionPathExists=!/usr/.noupdate 7 | 8 | [Automount] 9 | Where=/boot 10 | 11 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/boot.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Boot partition 3 | DefaultDependencies=no 4 | ConditionVirtualization=!container 5 | ConditionPathExists=!/usr/.noupdate 6 | 7 | [Mount] 8 | What=/dev/disk/by-label/EFI-SYSTEM 9 | Where=/boot 10 | 11 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/busnames.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Bus Names 10 | Documentation=man:systemd.special(7) 11 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/busnames.target.wants/org.freedesktop.hostname1.busname: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Hostname Service Bus Name 10 | Documentation=man:systemd-hostnamed.service(8) man:hostname(5) man:machine-info(5) 11 | Documentation=http://www.freedesktop.org/wiki/Software/systemd/hostnamed 12 | 13 | [BusName] 14 | Service=systemd-hostnamed.service 15 | AllowWorld=talk 16 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/busnames.target.wants/org.freedesktop.import1.busname: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Virtual Machine and Container Download Service Bus Name 10 | Documentation=man:systemd-importd.service(8) 11 | 12 | [BusName] 13 | Service=systemd-importd.service 14 | AllowWorld=talk 15 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/busnames.target.wants/org.freedesktop.locale1.busname: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Locale Service Bus Name 10 | Documentation=man:systemd-localed.service(8) man:locale.conf(5) man:vconsole.conf(5) 11 | Documentation=http://www.freedesktop.org/wiki/Software/systemd/localed 12 | 13 | [BusName] 14 | Service=systemd-localed.service 15 | AllowWorld=talk 16 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/busnames.target.wants/org.freedesktop.login1.busname: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Login Service Bus Name 10 | Documentation=man:systemd-logind.service(8) man:logind.conf(5) 11 | Documentation=http://www.freedesktop.org/wiki/Software/systemd/logind 12 | Documentation=http://www.freedesktop.org/wiki/Software/systemd/multiseat 13 | 14 | [BusName] 15 | Service=systemd-logind.service 16 | AllowWorld=talk 17 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/busnames.target.wants/org.freedesktop.machine1.busname: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Virtual Machine and Container Registration Service Bus Name 10 | Documentation=man:systemd-machined.service(8) 11 | Documentation=http://www.freedesktop.org/wiki/Software/systemd/machined 12 | 13 | [BusName] 14 | Service=systemd-machined.service 15 | AllowWorld=talk 16 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/busnames.target.wants/org.freedesktop.network1.busname: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Network Service Bus Name 10 | Documentation=man:systemd-networkd.service(8) 11 | 12 | # This is pulled in by systemd-networkd.service, since it cannot run 13 | # without its policy set. However, let's conditionalize this unit on 14 | # non-kdbus system. 15 | ConditionPathExists=/sys/fs/kdbus/0-system/ 16 | 17 | [BusName] 18 | Service=systemd-networkd.service 19 | AllowWorld=talk 20 | AllowUser=systemd-network own 21 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/busnames.target.wants/org.freedesktop.systemd1.busname: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=System and Service Manager Bus Name 10 | Documentation=man:systemd(1) 11 | Documentation=http://www.freedesktop.org/wiki/Software/systemd 12 | 13 | [BusName] 14 | Activating=no 15 | AllowWorld=talk 16 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/busnames.target.wants/org.freedesktop.timedate1.busname: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Time & Date Service Bus Name 10 | Documentation=man:systemd-timedated.service(8) man:localtime(5) 11 | Documentation=http://www.freedesktop.org/wiki/Software/systemd/timedated 12 | 13 | [BusName] 14 | Service=systemd-timedated.service 15 | AllowWorld=talk 16 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/clean-ca-certificates.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Clean up broken links in /etc/ssl/certs 3 | # Since other services depend on the certificate store run this early 4 | DefaultDependencies=no 5 | Wants=systemd-tmpfiles-setup.service 6 | After=systemd-tmpfiles-setup.service 7 | Before=sysinit.target 8 | ConditionPathIsReadWrite=/etc/ssl/certs 9 | 10 | [Service] 11 | Type=oneshot 12 | ExecStart=/usr/bin/find -L /etc/ssl/certs -type l -delete 13 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/console-getty.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Console Getty 10 | Documentation=man:agetty(8) 11 | After=systemd-user-sessions.service plymouth-quit-wait.service 12 | ConditionPathExists=/dev/console 13 | Before=getty.target 14 | 15 | [Service] 16 | ExecStart=-/sbin/agetty --noclear --keep-baud console 115200,38400,9600 $TERM 17 | Type=idle 18 | Restart=always 19 | RestartSec=0 20 | UtmpIdentifier=cons 21 | TTYPath=/dev/console 22 | TTYReset=yes 23 | TTYVHangup=yes 24 | KillMode=process 25 | IgnoreSIGPIPE=no 26 | SendSIGHUP=yes 27 | 28 | [Install] 29 | WantedBy=getty.target 30 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/console-shell.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Console Shell 10 | Documentation=man:sulogin(8) 11 | After=systemd-user-sessions.service plymouth-quit-wait.service 12 | Before=getty.target 13 | 14 | [Service] 15 | Environment=HOME=/root 16 | WorkingDirectory=-/root 17 | ExecStart=-/sbin/sulogin 18 | ExecStopPost=-/usr/bin/systemctl poweroff 19 | Type=idle 20 | StandardInput=tty-force 21 | StandardOutput=inherit 22 | StandardError=inherit 23 | KillMode=process 24 | IgnoreSIGPIPE=no 25 | SendSIGHUP=yes 26 | 27 | [Install] 28 | WantedBy=getty.target 29 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/containerd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Containerd Container Daemon 3 | Documentation=http://github.com/docker/containerd 4 | 5 | [Service] 6 | Type=simple 7 | ExecStart=/usr/bin/containerd --listen unix:///var/run/docker/libcontainerd/docker-containerd.sock --shim /usr/bin/containerd-shim --state-dir /var/run/docker/libcontainerd/containerd --runtime /usr/bin/runc 8 | 9 | # (lack of) limits from the upstream docker service unit 10 | LimitNOFILE=1048576 11 | LimitNPROC=infinity 12 | LimitCORE=infinity 13 | TasksMax=infinity 14 | 15 | # set delegate yes so that systemd does not reset the cgroups of containers 16 | Delegate=yes 17 | 18 | [Install] 19 | WantedBy=multi-user.target early-docker.target 20 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/coreos-metadata-sshkeys@.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=CoreOS Metadata Agent (SSH Keys) 3 | 4 | [Service] 5 | Type=oneshot 6 | ExecStart=/usr/bin/coreos-metadata --cmdline --ssh-keys=%i 7 | 8 | [Install] 9 | DefaultInstance=core 10 | RequiredBy=multi-user.target 11 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/coreos-metadata.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=CoreOS Metadata Agent 3 | 4 | [Service] 5 | Type=oneshot 6 | ExecStart=/usr/bin/coreos-metadata --cmdline --attributes=/run/metadata/coreos 7 | 8 | [Install] 9 | RequiredBy=metadata.target 10 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/coreos-setup-environment.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Modifies /etc/environment for CoreOS 3 | RequiresMountsFor=/usr/share/oem 4 | ConditionPathExists=/usr/share/oem/bin/coreos-setup-environment 5 | 6 | [Service] 7 | Type=oneshot 8 | RemainAfterExit=yes 9 | ExecStart=/usr/share/oem/bin/coreos-setup-environment /etc/environment 10 | 11 | [Install] 12 | WantedBy=multi-user.target 13 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/coreos-tmpfiles.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Create missing system files 3 | DefaultDependencies=no 4 | Before=sysinit.target systemd-sysusers.service 5 | ConditionPathIsReadWrite=/etc 6 | 7 | [Service] 8 | Type=oneshot 9 | ExecStart=/usr/sbin/coreos-tmpfiles 10 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/cryptsetup-pre.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Encrypted Volumes (Pre) 10 | Documentation=man:systemd.special(7) 11 | RefuseManualStart=yes 12 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/cryptsetup.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Encrypted Volumes 10 | Documentation=man:systemd.special(7) 11 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/ctrl-alt-del.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Reboot 10 | Documentation=man:systemd.special(7) 11 | DefaultDependencies=no 12 | Requires=systemd-reboot.service 13 | After=systemd-reboot.service 14 | AllowIsolate=yes 15 | JobTimeoutSec=30min 16 | JobTimeoutAction=reboot-force 17 | 18 | [Install] 19 | Alias=ctrl-alt-del.target 20 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/dbus-org.freedesktop.timedate1.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Time & Date Service 10 | Documentation=man:systemd-timedated.service(8) man:localtime(5) 11 | Documentation=http://www.freedesktop.org/wiki/Software/systemd/timedated 12 | 13 | [Service] 14 | ExecStart=/usr/lib/systemd/systemd-timedated 15 | BusName=org.freedesktop.timedate1 16 | CapabilityBoundingSet=CAP_SYS_TIME 17 | WatchdogSec=3min 18 | PrivateTmp=yes 19 | ProtectSystem=yes 20 | ProtectHome=yes 21 | MemoryDenyWriteExecute=yes 22 | SystemCallFilter=~@cpu-emulation @debug @keyring @module @mount @obsolete @raw-io 23 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/dbus.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=D-Bus System Message Bus 3 | Documentation=man:dbus-daemon(1) 4 | Requires=dbus.socket 5 | 6 | [Service] 7 | ExecStart=/usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation 8 | ExecReload=/usr/bin/dbus-send --print-reply --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig 9 | OOMScoreAdjust=-900 10 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/dbus.socket: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=D-Bus System Message Bus Socket 3 | 4 | [Socket] 5 | ListenStream=/var/run/dbus/system_bus_socket 6 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/dbus.target.wants/dbus.socket: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=D-Bus System Message Bus Socket 3 | 4 | [Socket] 5 | ListenStream=/var/run/dbus/system_bus_socket 6 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/default.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Multi-User System 10 | Documentation=man:systemd.special(7) 11 | Requires=basic.target 12 | Conflicts=rescue.service rescue.target 13 | After=basic.target rescue.service rescue.target 14 | AllowIsolate=yes 15 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/default.target.wants/system-config.target: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Load system-provided cloud configs 3 | 4 | # Generate /etc/environment 5 | Requires=coreos-setup-environment.service 6 | After=coreos-setup-environment.service 7 | 8 | # Load OEM cloud-config.yml 9 | Requires=system-cloudinit@usr-share-oem-cloud\x2dconfig.yml.service 10 | After=system-cloudinit@usr-share-oem-cloud\x2dconfig.yml.service 11 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/default.target.wants/user-config.target: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Load user-provided cloud configs 3 | Requires=system-config.target 4 | After=system-config.target 5 | 6 | # Watch for configs at a couple common paths 7 | Requires=user-cloudinit@var-lib-coreos\x2dinstall-user_data.path 8 | After=user-cloudinit@var-lib-coreos\x2dinstall-user_data.path 9 | 10 | Requires=user-cloudinit-proc-cmdline.service 11 | After=user-cloudinit-proc-cmdline.service 12 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/dev-hugepages.mount: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Huge Pages File System 10 | Documentation=https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt 11 | Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems 12 | DefaultDependencies=no 13 | Before=sysinit.target 14 | ConditionPathExists=/sys/kernel/mm/hugepages 15 | ConditionCapability=CAP_SYS_ADMIN 16 | 17 | [Mount] 18 | What=hugetlbfs 19 | Where=/dev/hugepages 20 | Type=hugetlbfs 21 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/dev-mqueue.mount: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=POSIX Message Queue File System 10 | Documentation=man:mq_overview(7) 11 | Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems 12 | DefaultDependencies=no 13 | Before=sysinit.target 14 | ConditionPathExists=/proc/sys/fs/mqueue 15 | ConditionCapability=CAP_SYS_ADMIN 16 | 17 | [Mount] 18 | What=mqueue 19 | Where=/dev/mqueue 20 | Type=mqueue 21 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/dhcpcd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Lightweight DHCP client daemon 3 | Wants=network.target 4 | Before=network.target network-online.target 5 | 6 | [Service] 7 | Type=forking 8 | ExecStart=/sbin/dhcpcd -q 9 | PIDFile=/run/dhcpcd.pid 10 | 11 | [Install] 12 | WantedBy=multi-user.target 13 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/dm-event.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Device-mapper event daemon 3 | Documentation=man:dmeventd(8) 4 | Requires=dm-event.socket 5 | After=dm-event.socket 6 | Before=local-fs.target 7 | DefaultDependencies=no 8 | 9 | [Service] 10 | Type=simple 11 | ExecStart=/sbin/dmeventd -f 12 | Environment=SD_ACTIVATION=1 13 | PIDFile=/run/dmeventd.pid 14 | OOMScoreAdjust=-1000 15 | 16 | [Install] 17 | WantedBy=sysinit.target 18 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/dm-event.socket: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Device-mapper event daemon FIFOs 3 | Documentation=man:dmeventd(8) 4 | DefaultDependencies=no 5 | 6 | [Socket] 7 | ListenFIFO=/run/dmeventd-server 8 | ListenFIFO=/run/dmeventd-client 9 | SocketMode=0600 10 | RemoveOnStop=true 11 | 12 | [Install] 13 | WantedBy=sockets.target 14 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/docker.socket: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Docker Socket for the API 3 | PartOf=docker.service 4 | 5 | [Socket] 6 | ListenStream=/var/run/docker.sock 7 | SocketMode=0660 8 | SocketUser=docker 9 | SocketGroup=docker 10 | 11 | [Install] 12 | WantedBy=sockets.target 13 | 14 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/early-docker.socket: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Early Docker Socket for the API 3 | PartOf=early-docker.service 4 | 5 | [Socket] 6 | ListenStream=/var/run/early-docker.sock 7 | 8 | [Install] 9 | WantedBy=sockets.target 10 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/early-docker.target: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Run Docker containers before main Docker starts up 3 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/emergency.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Emergency Mode 10 | Documentation=man:systemd.special(7) 11 | Requires=emergency.service 12 | After=emergency.service 13 | AllowIsolate=yes 14 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/etcd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=etcd 3 | Conflicts=etcd2.service 4 | 5 | [Service] 6 | User=etcd 7 | PermissionsStartOnly=true 8 | Environment=ETCD_DATA_DIR=/var/lib/etcd 9 | Environment=ETCD_NAME=%m 10 | ExecStart=/usr/bin/etcd 11 | Restart=always 12 | RestartSec=10s 13 | LimitNOFILE=40000 14 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/etcd2.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=etcd2 3 | Conflicts=etcd.service 4 | 5 | [Service] 6 | User=etcd 7 | Type=notify 8 | Environment=ETCD_DATA_DIR=/var/lib/etcd2 9 | Environment=ETCD_NAME=%m 10 | ExecStart=/usr/bin/etcd2 11 | Restart=always 12 | RestartSec=10s 13 | LimitNOFILE=40000 14 | TimeoutStartSec=0 15 | 16 | [Install] 17 | WantedBy=multi-user.target 18 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/exit.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Exit the container 10 | Documentation=man:systemd.special(7) 11 | DefaultDependencies=no 12 | Requires=systemd-exit.service 13 | After=systemd-exit.service 14 | AllowIsolate=yes 15 | 16 | [Install] 17 | Alias=ctrl-alt-del.target 18 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/extend-filesystems.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Extend Filesystems 3 | ConditionVirtualization=!container 4 | 5 | [Service] 6 | Type=oneshot 7 | RemainAfterExit=no 8 | ExecStart=/usr/lib/coreos/extend-filesystems 9 | StandardOutput=journal+console 10 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/final.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Final Step 10 | Documentation=man:systemd.special(7) 11 | DefaultDependencies=no 12 | RefuseManualStart=yes 13 | After=shutdown.target umount.target 14 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/flannel-docker-opts.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=flannel docker export service - Network fabric for containers (System Application Container) 3 | Documentation=https://github.com/coreos/flannel 4 | After=flannel.service 5 | PartOf=flannel.service 6 | Before=docker.service 7 | 8 | [Service] 9 | Type=oneshot 10 | TimeoutStartSec=60 11 | 12 | Environment="FLANNEL_IMAGE_TAG=v0.6.2" 13 | Environment="RKT_RUN_ARGS=--uuid-file-save=/var/lib/coreos/flannel-wrapper2.uuid" 14 | Environment="FLANNEL_IMAGE_ARGS=--exec=/opt/bin/mk-docker-opts.sh" 15 | 16 | ExecStartPre=-/usr/bin/rkt rm --uuid-file=/var/lib/coreos/flannel-wrapper2.uuid 17 | ExecStart=/usr/lib/coreos/flannel-wrapper -d /run/flannel/flannel_docker_opts.env -i 18 | ExecStop=-/usr/bin/rkt stop --uuid-file=/var/lib/coreos/flannel-wrapper2.uuid 19 | 20 | [Install] 21 | WantedBy=multi-user.target 22 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/fleet.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=fleet daemon 3 | 4 | After=etcd.service 5 | After=etcd2.service 6 | 7 | Wants=fleet.socket 8 | After=fleet.socket 9 | 10 | [Service] 11 | User=fleet 12 | Environment=GOMAXPROCS=1 13 | ExecStart=/usr/bin/fleetd 14 | Restart=always 15 | RestartSec=10s 16 | 17 | [Install] 18 | WantedBy=multi-user.target 19 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/fleet.socket: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Fleet API Socket 3 | PartOf=fleet.service 4 | 5 | [Socket] 6 | ListenStream=/var/run/fleet.sock 7 | SocketMode=0660 8 | SocketUser=fleet 9 | SocketGroup=fleet 10 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/fleet_unit_file.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Some Monitoring Service 3 | 4 | [Service] 5 | ExecStart=/bin/monitorme 6 | 7 | [X-Fleet] 8 | MachineMetadata=location=chicago 9 | Conflicts=monitor* 10 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/fstrim.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Discard unused blocks 3 | 4 | [Service] 5 | Type=oneshot 6 | ExecStart=/sbin/fstrim -a 7 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/fstrim.timer: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Discard unused blocks once a week 3 | Documentation=man:fstrim 4 | 5 | [Timer] 6 | OnCalendar=weekly 7 | AccuracySec=1h 8 | Persistent=true 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/getty.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Login Prompts 10 | Documentation=man:systemd.special(7) man:systemd-getty-generator(8) 11 | Documentation=http://0pointer.de/blog/projects/serial-console.html 12 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/git-daemon.socket: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Git Activation Socket 3 | 4 | [Socket] 5 | ListenStream=9418 6 | Accept=true 7 | 8 | [Install] 9 | WantedBy=sockets.target 10 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/git-daemon@.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Git Repositories Server Daemon 3 | Documentation=man:git-daemon(1) 4 | 5 | [Service] 6 | User=nobody 7 | Group=nobody 8 | EnvironmentFile=/etc/conf.d/git-daemon 9 | # Ignore non-zero exit status, access error makes git-daemon return them 10 | ExecStart=-/usr/libexec/git-core/git-daemon --inetd --base-path=/var/git --verbose $GITDAEMON_OPTS 11 | StandardInput=socket 12 | StandardOutput=inherit 13 | StandardError=journal 14 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/graphical.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Graphical Interface 10 | Documentation=man:systemd.special(7) 11 | Requires=multi-user.target 12 | Wants=display-manager.service 13 | Conflicts=rescue.service rescue.target 14 | After=multi-user.target rescue.service rescue.target display-manager.service 15 | AllowIsolate=yes 16 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/halt.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Halt 10 | Documentation=man:systemd.special(7) 11 | DefaultDependencies=no 12 | Requires=systemd-halt.service 13 | After=systemd-halt.service 14 | AllowIsolate=yes 15 | 16 | [Install] 17 | Alias=ctrl-alt-del.target 18 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/hibernate.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Hibernate 10 | Documentation=man:systemd.special(7) 11 | DefaultDependencies=no 12 | BindsTo=systemd-hibernate.service 13 | After=systemd-hibernate.service 14 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/hybrid-sleep.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Hybrid Suspend+Hibernate 10 | Documentation=man:systemd.special(7) 11 | DefaultDependencies=no 12 | BindsTo=systemd-hybrid-sleep.service 13 | After=systemd-hybrid-sleep.service 14 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/initrd-cleanup.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Cleaning Up and Shutting Down Daemons 10 | DefaultDependencies=no 11 | ConditionPathExists=/etc/initrd-release 12 | OnFailure=emergency.target 13 | OnFailureJobMode=replace-irreversibly 14 | After=initrd-root-fs.target initrd-fs.target initrd.target 15 | 16 | [Service] 17 | Type=oneshot 18 | ExecStart=/usr/bin/systemctl --no-block isolate initrd-switch-root.target 19 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/initrd-fs.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Initrd File Systems 10 | Documentation=man:systemd.special(7) 11 | OnFailure=emergency.target 12 | OnFailureJobMode=replace-irreversibly 13 | ConditionPathExists=/etc/initrd-release 14 | After=initrd-parse-etc.service 15 | DefaultDependencies=no 16 | Conflicts=shutdown.target 17 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/initrd-root-device.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Initrd Root Device 10 | Documentation=man:systemd.special(7) 11 | ConditionPathExists=/etc/initrd-release 12 | OnFailure=emergency.target 13 | OnFailureJobMode=replace-irreversibly 14 | DefaultDependencies=no 15 | Conflicts=shutdown.target 16 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/initrd-root-fs.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Initrd Root File System 10 | Documentation=man:systemd.special(7) 11 | ConditionPathExists=/etc/initrd-release 12 | OnFailure=emergency.target 13 | OnFailureJobMode=replace-irreversibly 14 | DefaultDependencies=no 15 | Conflicts=shutdown.target 16 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/initrd-switch-root.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Switch Root 10 | DefaultDependencies=no 11 | ConditionPathExists=/etc/initrd-release 12 | OnFailure=emergency.target 13 | OnFailureJobMode=replace-irreversibly 14 | AllowIsolate=yes 15 | 16 | [Service] 17 | Type=oneshot 18 | # we have to use "--force" here, otherwise systemd would umount /run 19 | ExecStart=/usr/bin/systemctl --no-block --force switch-root /sysroot 20 | KillMode=none 21 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/initrd-switch-root.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Switch Root 10 | ConditionPathExists=/etc/initrd-release 11 | DefaultDependencies=no 12 | Requires=initrd-switch-root.service 13 | Before=initrd-switch-root.service 14 | AllowIsolate=yes 15 | Wants=initrd-udevadm-cleanup-db.service initrd-root-fs.target initrd-fs.target systemd-journald.service 16 | After=initrd-udevadm-cleanup-db.service initrd-root-fs.target initrd-fs.target emergency.service emergency.target 17 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/initrd-udevadm-cleanup-db.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Cleanup udevd DB 10 | DefaultDependencies=no 11 | ConditionPathExists=/etc/initrd-release 12 | Conflicts=systemd-udevd.service systemd-udevd-control.socket systemd-udevd-kernel.socket 13 | After=systemd-udevd.service systemd-udevd-control.socket systemd-udevd-kernel.socket 14 | Before=initrd-switch-root.target 15 | 16 | [Service] 17 | Type=oneshot 18 | ExecStart=-/usr/bin/udevadm info --cleanup-db 19 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/initrd.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Initrd Default Target 10 | Documentation=man:systemd.special(7) 11 | OnFailure=emergency.target 12 | OnFailureJobMode=replace-irreversibly 13 | ConditionPathExists=/etc/initrd-release 14 | Requires=basic.target 15 | Wants=initrd-root-fs.target initrd-root-device.target initrd-fs.target initrd-parse-etc.service 16 | After=initrd-root-fs.target initrd-root-device.target initrd-fs.target basic.target rescue.service rescue.target 17 | AllowIsolate=yes 18 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/ip6tables-restore.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Restore ip6tables firewall rules 3 | # if both are queued for some reason, don't store before restoring :) 4 | Before=ip6tables-store.service 5 | # sounds reasonable to have firewall up before any of the services go up 6 | Before=network.target 7 | Conflicts=shutdown.target 8 | 9 | [Service] 10 | Type=oneshot 11 | ExecStart=/sbin/ip6tables-restore /var/lib/ip6tables/rules-save 12 | 13 | [Install] 14 | WantedBy=basic.target 15 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/ip6tables-store.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Store ip6tables firewall rules 3 | Before=shutdown.target 4 | DefaultDependencies=No 5 | 6 | [Service] 7 | Type=oneshot 8 | ExecStart=/bin/sh -c "/sbin/ip6tables-save --counters > /var/lib/ip6tables/rules-save" 9 | 10 | [Install] 11 | WantedBy=shutdown.target 12 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/ip6tables.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Store and restore ip6tables firewall rules 3 | 4 | [Install] 5 | Also=ip6tables-store.service 6 | Also=ip6tables-restore.service 7 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/iptables-restore.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Restore iptables firewall rules 3 | # if both are queued for some reason, don't store before restoring :) 4 | Before=iptables-store.service 5 | # sounds reasonable to have firewall up before any of the services go up 6 | Before=network.target 7 | Conflicts=shutdown.target 8 | 9 | [Service] 10 | Type=oneshot 11 | ExecStart=/sbin/iptables-restore /var/lib/iptables/rules-save 12 | 13 | [Install] 14 | WantedBy=basic.target 15 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/iptables-store.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Store iptables firewall rules 3 | Before=shutdown.target 4 | DefaultDependencies=No 5 | 6 | [Service] 7 | Type=oneshot 8 | ExecStart=/bin/sh -c "/sbin/iptables-save --counters > /var/lib/iptables/rules-save" 9 | 10 | [Install] 11 | WantedBy=shutdown.target 12 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/iptables.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Store and restore iptables firewall rules 3 | 4 | [Install] 5 | Also=iptables-store.service 6 | Also=iptables-restore.service 7 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/iscsid-initiatorname.service: -------------------------------------------------------------------------------- 1 | # Generate an iSCSI initiator name if one doesn't already exist 2 | [Unit] 3 | Description=iSCSI initiator name generator 4 | After=systemd-tmpfiles-setup.service 5 | ConditionPathExists=!/etc/iscsi/initiatorname.iscsi 6 | DefaultDependencies=no 7 | 8 | [Service] 9 | Type=oneshot 10 | ExecStart=/bin/sh -c 'echo InitiatorName=iqn.2016-04.com.coreos.iscsi:$(/etc/iscsi/initiatorname.iscsi' 11 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/iscsid.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Open-iSCSI 3 | Documentation=man:iscsid(8) man:iscsiuio(8) man:iscsiadm(8) 4 | After=network.target NetworkManager-wait-online.service iscsid-initiatorname.service iscsiuio.service tgtd.service targetcli.service 5 | Requires=iscsid-initiatorname.service 6 | 7 | [Service] 8 | Type=forking 9 | PIDFile=/var/run/iscsid.pid 10 | ExecStart=/usr/sbin/iscsid 11 | ExecStartPost=-/sbin/iscsiadm -m node --loginall=automatic 12 | ExecStop=-/sbin/iscsiadm -m node --logoutall=all 13 | ExecStop=/sbin/iscsiadm -k 0 2 14 | 15 | [Install] 16 | WantedBy=multi-user.target 17 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/iscsid.socket: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Open-iSCSI iscsid Socket 3 | Documentation=man:iscsid(8) man:iscsiuio(8) man:iscsiadm(8) 4 | 5 | [Socket] 6 | ListenStream=@ISCSIADM_ABSTRACT_NAMESPACE 7 | 8 | [Install] 9 | WantedBy=sockets.target 10 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/issuegen.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Generate /run/issue 3 | Before=systemd-user-sessions.service 4 | After=sshd-keygen.service 5 | 6 | [Service] 7 | Type=oneshot 8 | ExecStart=/usr/lib/coreos/issuegen 9 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/kexec.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Reboot via kexec 10 | Documentation=man:systemd.special(7) 11 | DefaultDependencies=no 12 | Requires=systemd-kexec.service 13 | After=systemd-kexec.service 14 | AllowIsolate=yes 15 | 16 | [Install] 17 | Alias=ctrl-alt-del.target 18 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/kmod-static-nodes.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Create list of required static device nodes for the current kernel 10 | DefaultDependencies=no 11 | Before=sysinit.target systemd-tmpfiles-setup-dev.service 12 | ConditionCapability=CAP_SYS_MODULE 13 | ConditionFileNotEmpty=/lib/modules/%v/modules.devname 14 | 15 | [Service] 16 | Type=oneshot 17 | RemainAfterExit=yes 18 | ExecStart=/bin/kmod static-nodes --format=tmpfiles --output=/run/tmpfiles.d/kmod.conf 19 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/ldconfig.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Rebuild Dynamic Linker Cache 10 | Documentation=man:ldconfig(8) 11 | DefaultDependencies=no 12 | Conflicts=shutdown.target 13 | After=local-fs.target 14 | Before=sysinit.target shutdown.target systemd-update-done.service 15 | ConditionNeedsUpdate=|/etc 16 | ConditionFileNotEmpty=|!/etc/ld.so.cache 17 | 18 | [Service] 19 | Type=oneshot 20 | RemainAfterExit=yes 21 | ExecStart=/sbin/ldconfig -X 22 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/local-fs-pre.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Local File Systems (Pre) 10 | Documentation=man:systemd.special(7) 11 | RefuseManualStart=yes 12 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/local-fs-pre.target.wants/setup-nsswitch.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Create /etc/nsswitch.conf 3 | Before=local-fs-pre.target systemd-tmpfiles-setup.service systemd-sysusers.service 4 | DefaultDependencies=no 5 | ConditionPathExists=!/etc/nsswitch.conf 6 | 7 | [Service] 8 | Type=oneshot 9 | ExecStart=/usr/bin/ln -s ../usr/share/baselayout/nsswitch.conf /etc/nsswitch.conf 10 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/local-fs.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Local File Systems 10 | Documentation=man:systemd.special(7) 11 | DefaultDependencies=no 12 | Conflicts=shutdown.target 13 | After=local-fs-pre.target 14 | OnFailure=emergency.target 15 | OnFailureJobMode=replace-irreversibly 16 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/local-fs.target.wants/boot.automount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Boot partition Automount Point 3 | DefaultDependencies=no 4 | Before=sysinit.target 5 | ConditionVirtualization=!container 6 | ConditionPathExists=!/usr/.noupdate 7 | 8 | [Automount] 9 | Where=/boot 10 | 11 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/local-fs.target.wants/media.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=External Media Directory 3 | DefaultDependencies=no 4 | Conflicts=umount.target 5 | Before=local-fs.target umount.target 6 | ConditionVirtualization=!container 7 | 8 | [Mount] 9 | What=tmpfs 10 | Where=/media 11 | Type=tmpfs 12 | Options=nodev,noexec,nosuid 13 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/local-fs.target.wants/proc-xen.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Before=local-fs.target 3 | DefaultDependencies=false 4 | ConditionVirtualization=xen 5 | 6 | [Mount] 7 | What=xenfs 8 | Where=/proc/xen 9 | Type=xenfs 10 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/local-fs.target.wants/remount-root.service: -------------------------------------------------------------------------------- 1 | # Normally systemd-remount-fs does this but only if / is in fstab. 2 | # Since that is not the case in CoreOS we need this instead. 3 | 4 | [Unit] 5 | Description=Remount Root File System 6 | DefaultDependencies=no 7 | Conflicts=shutdown.target 8 | After=systemd-remount-fs.service 9 | Before=local-fs-pre.target local-fs.target shutdown.target 10 | Wants=local-fs-pre.target 11 | ConditionVirtualization=!container 12 | ConditionPathIsMountPoint=/ 13 | ConditionPathIsReadWrite=!/ 14 | 15 | [Service] 16 | Type=oneshot 17 | RemainAfterExit=yes 18 | ExecStart=/bin/mount -o remount,rw / 19 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/local-fs.target.wants/systemd-remount-fs.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Remount Root and Kernel File Systems 10 | Documentation=man:systemd-remount-fs.service(8) 11 | Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems 12 | DefaultDependencies=no 13 | Conflicts=shutdown.target 14 | After=systemd-fsck-root.service 15 | Before=local-fs-pre.target local-fs.target shutdown.target 16 | Wants=local-fs-pre.target 17 | ConditionPathExists=/etc/fstab 18 | 19 | [Service] 20 | Type=oneshot 21 | RemainAfterExit=yes 22 | ExecStart=/usr/lib/systemd/systemd-remount-fs 23 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/local-fs.target.wants/tmp.mount: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Temporary Directory 10 | Documentation=man:hier(7) 11 | Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems 12 | ConditionPathIsSymbolicLink=!/tmp 13 | DefaultDependencies=no 14 | Conflicts=umount.target 15 | Before=local-fs.target umount.target 16 | 17 | [Mount] 18 | What=tmpfs 19 | Where=/tmp 20 | Type=tmpfs 21 | Options=mode=1777,strictatime 22 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/local-fs.target.wants/usr-share-oem.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | DefaultDependencies=no 3 | Wants=addon-run@usr-share-oem.service addon-config@usr-share-oem.service 4 | Before=addon-run@usr-share-oem.service addon-config@usr-share-oem.service 5 | Conflicts=umount.target 6 | Before=local-fs.target umount.target ldconfig.service 7 | ConditionVirtualization=!container 8 | ConditionPathExists=!/usr/.noupdate 9 | 10 | [Mount] 11 | What=/dev/disk/by-label/OEM 12 | Where=/usr/share/oem 13 | Options=nodev,commit=600 14 | Type=ext4 15 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/local-fs.target.wants/var-lib-machines.mount: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Virtual Machine and Container Storage 10 | ConditionPathExists=/var/lib/machines.raw 11 | 12 | [Mount] 13 | What=/var/lib/machines.raw 14 | Where=/var/lib/machines 15 | Type=btrfs 16 | Options=loop 17 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/locksmithd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Cluster reboot manager 3 | ConditionVirtualization=!container 4 | ConditionPathExists=!/usr/.noupdate 5 | 6 | [Service] 7 | CPUShares=16 8 | MemoryLimit=32M 9 | PrivateDevices=true 10 | Environment=GOMAXPROCS=1 11 | EnvironmentFile=-/usr/share/coreos/update.conf 12 | EnvironmentFile=-/etc/coreos/update.conf 13 | ExecStart=/usr/lib/locksmith/locksmithd 14 | Restart=on-failure 15 | RestartSec=10s 16 | 17 | [Install] 18 | WantedBy=multi-user.target 19 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/logrotate.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Rotate and Compress System Logs 3 | 4 | [Service] 5 | ExecStart=/usr/sbin/logrotate /usr/share/logrotate/logrotate.conf 6 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/logrotate.timer: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Daily Log Rotation 3 | 4 | [Timer] 5 | OnCalendar=daily 6 | AccuracySec=1h 7 | Persistent=true 8 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/lvm2-activation-early.service: -------------------------------------------------------------------------------- 1 | # Automatically generated by lvm2-activation-generator. 2 | # 3 | # This unit is responsible for direct activation of LVM2 logical volumes 4 | # if lvmetad daemon is not used (global/use_lvmetad=0 lvm.conf setting), 5 | # hence volume autoactivation is not applicable. 6 | # Direct LVM2 activation requires udev to be settled! 7 | 8 | [Unit] 9 | Description=Activation of LVM2 logical volumes 10 | Documentation=man:lvm2-activation-generator(8) 11 | SourcePath=/etc/lvm/lvm.conf 12 | DefaultDependencies=no 13 | After=systemd-udev-settle.service 14 | Before=cryptsetup.target 15 | Before=local-fs.target shutdown.target 16 | Wants=systemd-udev-settle.service 17 | 18 | [Service] 19 | ExecStart=/sbin/lvm vgchange -aay --sysinit --ignoreskippedcluster 20 | Type=oneshot 21 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/lvm2-activation-net.service: -------------------------------------------------------------------------------- 1 | # Automatically generated by lvm2-activation-generator. 2 | # 3 | # This unit is responsible for direct activation of LVM2 logical volumes 4 | # if lvmetad daemon is not used (global/use_lvmetad=0 lvm.conf setting), 5 | # hence volume autoactivation is not applicable. 6 | # Direct LVM2 activation requires udev to be settled! 7 | 8 | [Unit] 9 | Description=Activation of LVM2 logical volumes 10 | Documentation=man:lvm2-activation-generator(8) 11 | SourcePath=/etc/lvm/lvm.conf 12 | DefaultDependencies=no 13 | After=lvm2-activation.service iscsi.service fcoe.service 14 | Before=remote-fs.target shutdown.target 15 | 16 | [Service] 17 | ExecStartPre=/usr/bin/udevadm settle 18 | ExecStart=/sbin/lvm vgchange -aay --sysinit --ignoreskippedcluster 19 | Type=oneshot 20 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/lvm2-activation.service: -------------------------------------------------------------------------------- 1 | # Automatically generated by lvm2-activation-generator. 2 | # 3 | # This unit is responsible for direct activation of LVM2 logical volumes 4 | # if lvmetad daemon is not used (global/use_lvmetad=0 lvm.conf setting), 5 | # hence volume autoactivation is not applicable. 6 | # Direct LVM2 activation requires udev to be settled! 7 | 8 | [Unit] 9 | Description=Activation of LVM2 logical volumes 10 | Documentation=man:lvm2-activation-generator(8) 11 | SourcePath=/etc/lvm/lvm.conf 12 | DefaultDependencies=no 13 | After= lvm2-activation-early.service cryptsetup.target 14 | Before=local-fs.target shutdown.target 15 | Wants=systemd-udev-settle.service 16 | 17 | [Service] 18 | ExecStart=/sbin/lvm vgchange -aay --sysinit --ignoreskippedcluster 19 | Type=oneshot 20 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/lvm2-lvmetad.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=LVM2 metadata daemon 3 | Documentation=man:lvmetad(8) 4 | Requires=lvm2-lvmetad.socket 5 | After=lvm2-lvmetad.socket 6 | DefaultDependencies=no 7 | Conflicts=shutdown.target 8 | 9 | [Service] 10 | Type=simple 11 | NonBlocking=true 12 | ExecStart=/sbin/lvmetad -f 13 | Environment=SD_ACTIVATION=1 14 | Restart=on-abort 15 | PIDFile=/run/lvmetad.pid 16 | 17 | [Install] 18 | WantedBy=sysinit.target 19 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/lvm2-lvmetad.socket: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=LVM2 metadata daemon socket 3 | Documentation=man:lvmetad(8) 4 | DefaultDependencies=no 5 | 6 | [Socket] 7 | ListenStream=/run/lvm/lvmetad.socket 8 | SocketMode=0600 9 | RemoveOnStop=true 10 | 11 | [Install] 12 | WantedBy=sysinit.target 13 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/lvm2-monitor.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling 3 | Documentation=man:dmeventd(8) man:lvcreate(8) man:lvchange(8) man:vgchange(8) 4 | Requires=dm-event.socket lvm2-lvmetad.socket 5 | After=dm-event.socket lvm2-lvmetad.socket lvm2-activation.service lvm2-lvmetad.service 6 | Before=local-fs.target 7 | DefaultDependencies=no 8 | Conflicts=shutdown.target 9 | 10 | [Service] 11 | Type=oneshot 12 | Environment=LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES=1 13 | ExecStart=/sbin/lvm vgchange --monitor y --ignoreskippedcluster 14 | ExecStop=/sbin/lvm vgchange --monitor n --ignoreskippedcluster 15 | RemainAfterExit=yes 16 | 17 | [Install] 18 | WantedBy=sysinit.target 19 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/lvm2-pvscan@.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=LVM2 PV scan on device %i 3 | Documentation=man:pvscan(8) 4 | DefaultDependencies=no 5 | BindsTo=dev-block-%i.device 6 | Requires=lvm2-lvmetad.socket 7 | After=lvm2-lvmetad.socket 8 | Before=shutdown.target 9 | Conflicts=shutdown.target 10 | 11 | [Service] 12 | Type=oneshot 13 | RemainAfterExit=yes 14 | ExecStart=/sbin/lvm pvscan --cache --activate ay %i 15 | ExecStop=/sbin/lvm pvscan --cache %i 16 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/machine.slice: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Virtual Machine and Container Slice 10 | Documentation=man:systemd.special(7) 11 | Before=slices.target 12 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/machines.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Containers 10 | Documentation=man:systemd.special(7) 11 | Requires=basic.target 12 | Conflicts=rescue.service rescue.target 13 | After=basic.target rescue.service rescue.target 14 | Before=multi-user.target 15 | 16 | [Install] 17 | WantedBy=multi-user.target 18 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/mcstrans.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Translates SELinux MCS/MLS labels to human readable form 3 | ConditionSecurity=selinux 4 | 5 | [Service] 6 | ExecStart=/sbin/mcstransd -f 7 | RuntimeDirectory=setrans 8 | 9 | [Install] 10 | WantedBy=multi-user.target 11 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/mdadm-grow-continue@.service: -------------------------------------------------------------------------------- 1 | # This file is part of mdadm. 2 | # 3 | # mdadm is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; either version 2 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Manage MD Reshape on /dev/%I 10 | DefaultDependencies=no 11 | 12 | [Service] 13 | ExecStart=/sbin/mdadm --grow --continue /dev/%I 14 | StandardInput=null 15 | StandardOutput=null 16 | StandardError=null 17 | KillMode=none 18 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/mdadm-last-resort@.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Activate md array even though degraded 3 | DefaultDependencies=no 4 | 5 | [Service] 6 | Type=oneshot 7 | ExecStart=/sbin/mdadm --run /dev/%i 8 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/mdadm-last-resort@.timer: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Timer to wait for more drives before activating degraded array. 3 | DefaultDependencies=no 4 | Conflicts=sys-devices-virtual-block-%i.device 5 | 6 | [Timer] 7 | OnActiveSec=30 8 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/mdmonitor.service: -------------------------------------------------------------------------------- 1 | # This file is part of mdadm. 2 | # 3 | # mdadm is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; either version 2 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=MD array monitor 10 | DefaultDependencies=no 11 | 12 | [Service] 13 | Environment= MDADM_MONITOR_ARGS=--scan 14 | EnvironmentFile=-/run/sysconfig/mdadm 15 | ExecStartPre=-/usr/lib/systemd/scripts/mdadm_env.sh 16 | ExecStart=/sbin/mdadm --monitor $MDADM_MONITOR_ARGS 17 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/media-configdrive.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Wants=user-configdrive.service 3 | Before=user-configdrive.service 4 | # Only mount config drive block devices automatically in virtual machines 5 | # or any host that has it explicitly enabled and not explicitly disabled. 6 | ConditionVirtualization=|vm 7 | ConditionKernelCommandLine=|coreos.configdrive=1 8 | ConditionKernelCommandLine=!coreos.configdrive=0 9 | 10 | [Mount] 11 | What=LABEL=config-2 12 | Where=/media/configdrive 13 | Options=ro 14 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/media-configvirtfs.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Wants=user-configvirtfs.service 3 | Before=user-configvirtfs.service 4 | # Only mount config drive block devices automatically in virtual machines 5 | # or any host that has it explicitly enabled and not explicitly disabled. 6 | ConditionVirtualization=|vm 7 | ConditionKernelCommandLine=|coreos.configdrive=1 8 | ConditionKernelCommandLine=!coreos.configdrive=0 9 | 10 | # Support old style setup for now 11 | Wants=addon-run@media-configvirtfs.service addon-config@media-configvirtfs.service 12 | Before=addon-run@media-configvirtfs.service addon-config@media-configvirtfs.service 13 | 14 | [Mount] 15 | What=config-2 16 | Where=/media/configvirtfs 17 | Options=ro,trans=virtio,version=9p2000.L 18 | Type=9p 19 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/media-ovfenv.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Wants=user-config-ovfenv.service 3 | Before=user-config-ovfenv.service 4 | # Only mount ovfenv drive block devices automatically in virtual machines 5 | ConditionVirtualization=vmware 6 | 7 | [Mount] 8 | What=LABEL="OVF ENV" 9 | Where=/media/ovfenv 10 | Options=ro 11 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/media.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=External Media Directory 3 | DefaultDependencies=no 4 | Conflicts=umount.target 5 | Before=local-fs.target umount.target 6 | ConditionVirtualization=!container 7 | 8 | [Mount] 9 | What=tmpfs 10 | Where=/media 11 | Type=tmpfs 12 | Options=nodev,noexec,nosuid 13 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/motdgen.path: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Watch for update engine configuration changes 3 | 4 | [Path] 5 | PathChanged=/etc/coreos/update.conf 6 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/motdgen.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Generate /run/coreos/motd 3 | Before=systemd-user-sessions.service 4 | After=locksmithd.service 5 | 6 | [Service] 7 | Type=oneshot 8 | ExecStart=/usr/lib/coreos/motdgen 9 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/multi-user.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Multi-User System 10 | Documentation=man:systemd.special(7) 11 | Requires=basic.target 12 | Conflicts=rescue.service rescue.target 13 | After=basic.target rescue.service rescue.target 14 | AllowIsolate=yes 15 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/multi-user.target.wants/audit-rules.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Load Security Auditing Rules 3 | DefaultDependencies=no 4 | After=local-fs.target systemd-tmpfiles-setup.service 5 | Conflicts=shutdown.target 6 | Before=sysinit.target shutdown.target 7 | ConditionSecurity=audit 8 | 9 | [Service] 10 | Type=oneshot 11 | RemainAfterExit=yes 12 | ExecStart=/sbin/augenrules --load 13 | ExecStop=-/sbin/auditctl -D 14 | 15 | [Install] 16 | WantedBy=multi-user.target 17 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/multi-user.target.wants/dbus.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=D-Bus System Message Bus 3 | Documentation=man:dbus-daemon(1) 4 | Requires=dbus.socket 5 | 6 | [Service] 7 | ExecStart=/usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation 8 | ExecReload=/usr/bin/dbus-send --print-reply --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig 9 | OOMScoreAdjust=-900 10 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/multi-user.target.wants/extend-filesystems.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Extend Filesystems 3 | ConditionVirtualization=!container 4 | 5 | [Service] 6 | Type=oneshot 7 | RemainAfterExit=no 8 | ExecStart=/usr/lib/coreos/extend-filesystems 9 | StandardOutput=journal+console 10 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/multi-user.target.wants/getty.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Login Prompts 10 | Documentation=man:systemd.special(7) man:systemd-getty-generator(8) 11 | Documentation=http://0pointer.de/blog/projects/serial-console.html 12 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/multi-user.target.wants/issuegen.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Generate /run/issue 3 | Before=systemd-user-sessions.service 4 | After=sshd-keygen.service 5 | 6 | [Service] 7 | Type=oneshot 8 | ExecStart=/usr/lib/coreos/issuegen 9 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/multi-user.target.wants/locksmithd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Cluster reboot manager 3 | ConditionVirtualization=!container 4 | ConditionPathExists=!/usr/.noupdate 5 | 6 | [Service] 7 | CPUShares=16 8 | MemoryLimit=32M 9 | PrivateDevices=true 10 | Environment=GOMAXPROCS=1 11 | EnvironmentFile=-/usr/share/coreos/update.conf 12 | EnvironmentFile=-/etc/coreos/update.conf 13 | ExecStart=/usr/lib/locksmith/locksmithd 14 | Restart=always 15 | RestartSec=10s 16 | 17 | [Install] 18 | WantedBy=multi-user.target 19 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/multi-user.target.wants/logrotate.timer: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Daily Log Rotation 3 | 4 | [Timer] 5 | OnCalendar=daily 6 | AccuracySec=1h 7 | Persistent=true 8 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/multi-user.target.wants/motdgen.path: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Watch for update engine configuration changes 3 | 4 | [Path] 5 | PathChanged=/etc/coreos/update.conf 6 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/multi-user.target.wants/motdgen.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Generate /run/coreos/motd 3 | Before=systemd-user-sessions.service 4 | After=locksmithd.service 5 | 6 | [Service] 7 | Type=oneshot 8 | ExecStart=/usr/lib/coreos/motdgen 9 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/multi-user.target.wants/remote-fs.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Remote File Systems 10 | Documentation=man:systemd.special(7) 11 | After=remote-fs-pre.target 12 | DefaultDependencies=no 13 | Conflicts=shutdown.target 14 | 15 | [Install] 16 | WantedBy=multi-user.target 17 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/multi-user.target.wants/rkt-gc.timer: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Periodic Garbage Collection for rkt 3 | 4 | [Timer] 5 | OnActiveSec=0s 6 | OnUnitActiveSec=12h 7 | 8 | [Install] 9 | WantedBy=default.target 10 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/multi-user.target.wants/ssh-key-proc-cmdline.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Install an ssh key from /proc/cmdline 3 | 4 | [Service] 5 | Type=oneshot 6 | ExecStart=/usr/lib/coreos/ssh-key-proc-cmdline 7 | 8 | [Install] 9 | WantedBy=multi-user.target 10 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/multi-user.target.wants/sshd-keygen.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Generate sshd host keys 3 | Before=sshd.service 4 | 5 | [Service] 6 | Type=oneshot 7 | RemainAfterExit=yes 8 | ExecStart=/usr/lib/coreos/sshd_keygen 9 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/multi-user.target.wants/systemd-ask-password-wall.path: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Forward Password Requests to Wall Directory Watch 10 | Documentation=man:systemd-ask-password-console.service(8) 11 | DefaultDependencies=no 12 | Conflicts=shutdown.target 13 | Before=paths.target shutdown.target 14 | 15 | [Path] 16 | DirectoryNotEmpty=/run/systemd/ask-password 17 | MakeDirectory=yes 18 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/multi-user.target.wants/systemd-user-sessions.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Permit User Sessions 10 | Documentation=man:systemd-user-sessions.service(8) 11 | After=remote-fs.target nss-user-lookup.target 12 | 13 | [Service] 14 | Type=oneshot 15 | RemainAfterExit=yes 16 | ExecStart=/usr/lib/systemd/systemd-user-sessions start 17 | ExecStop=/usr/lib/systemd/systemd-user-sessions stop 18 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/multi-user.target.wants/tcsd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=TCG Core Services Daemon 3 | ConditionPathExists=/dev/tpm0 4 | 5 | [Service] 6 | User=tss 7 | ExecStart=/usr/sbin/tcsd -f 8 | 9 | [Install] 10 | WantedBy=multi-user.target 11 | 12 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/multi-user.target.wants/update-engine-stub.timer: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Update Engine Stub Timer 3 | ConditionVirtualization=!container 4 | ConditionPathExists=/usr/.noupdate 5 | 6 | [Timer] 7 | OnBootSec=7minutes 8 | OnActiveSec=41minutes 9 | Unit=update-engine-stub.service 10 | 11 | [Install] 12 | WantedBy=default.target 13 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/multi-user.target.wants/update-engine.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Update Engine 3 | ConditionVirtualization=!container 4 | ConditionPathExists=!/usr/.noupdate 5 | 6 | [Service] 7 | Type=dbus 8 | BusName=com.coreos.update1 9 | ExecStart=/usr/sbin/update_engine -foreground -logtostderr 10 | BlockIOWeight=100 11 | Restart=always 12 | RestartSec=30 13 | 14 | [Install] 15 | WantedBy=default.target 16 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/multipathd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Device-Mapper Multipath Device Controller 3 | Before=iscsi.service iscsid.service lvm2-activation-early.service 4 | After=syslog.target 5 | DefaultDependencies=no 6 | Conflicts=shutdown.target 7 | 8 | [Service] 9 | Type=notify 10 | NotifyAccess=main 11 | LimitCORE=infinity 12 | ExecStartPre=/sbin/modprobe dm-multipath 13 | ExecStart=/sbin/multipathd -d -s 14 | ExecReload=/sbin/multipathd reconfigure 15 | 16 | [Install] 17 | WantedBy=sysinit.target 18 | Also=multipathd.socket 19 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/multipathd.socket: -------------------------------------------------------------------------------- 1 | [Socket] 2 | ListenStream=@/org/kernel/linux/storage/multipathd 3 | 4 | [Install] 5 | WantedBy=sockets.target 6 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/network-online.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Network is Online 10 | Documentation=man:systemd.special(7) 11 | Documentation=http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget 12 | After=network.target 13 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/network-online.target.wants/systemd-networkd-wait-online.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Wait for Network to be Configured 10 | Documentation=man:systemd-networkd-wait-online.service(8) 11 | DefaultDependencies=no 12 | Conflicts=shutdown.target 13 | Requisite=systemd-networkd.service 14 | After=systemd-networkd.service 15 | Before=network-online.target 16 | 17 | [Service] 18 | Type=oneshot 19 | ExecStart=/usr/lib/systemd/systemd-networkd-wait-online 20 | RemainAfterExit=yes 21 | 22 | [Install] 23 | WantedBy=network-online.target 24 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/network-pre.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Network (Pre) 10 | Documentation=man:systemd.special(7) 11 | Documentation=http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget 12 | RefuseManualStart=yes 13 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/network.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Network 10 | Documentation=man:systemd.special(7) 11 | Documentation=http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget 12 | After=network-pre.target 13 | RefuseManualStart=yes 14 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/nfs-client.target: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=NFS client services 3 | Before=remote-fs-pre.target 4 | Wants=remote-fs-pre.target 5 | 6 | # Note: we don't "Wants=rpc-statd.service" as "mount.nfs" will arrange to 7 | # start that on demand if needed. 8 | Wants=nfs-blkmap.service rpc-statd-notify.service 9 | After=nfs-blkmap.service 10 | 11 | # GSS services dependencies and ordering 12 | Wants=auth-rpcgss-module.service 13 | After=rpc-gssd.service rpc-svcgssd.service gssproxy.service 14 | 15 | [Install] 16 | WantedBy=multi-user.target 17 | WantedBy=remote-fs.target 18 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/nfs-idmapd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=NFSv4 ID-name mapping service 3 | Requires=var-lib-nfs-rpc_pipefs.mount 4 | After=var-lib-nfs-rpc_pipefs.mount 5 | 6 | BindsTo=nfs-server.service 7 | 8 | 9 | [Service] 10 | Type=forking 11 | ExecStart=/usr/sbin/rpc.idmapd $RPCIDMAPDARGS 12 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/nfs-mountd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=NFS Mount Daemon 3 | Requires=proc-fs-nfsd.mount 4 | After=proc-fs-nfsd.mount 5 | After=network.target 6 | BindsTo=nfs-server.service 7 | 8 | 9 | [Service] 10 | Type=forking 11 | ExecStart=/usr/sbin/rpc.mountd $RPCMOUNTDARGS 12 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/nfs-utils.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=NFS server and client services 3 | # This service should never be stopped, only restarted. 4 | # When it is re-started, all other services which declare 5 | # themselves to be "PartOf" this service will also be 6 | # restarted. Thus 7 | # systemctl restart nfs-utils 8 | # will restart all daemons which are part of nfs-utils 9 | # and which are running. This is useful after a software 10 | # update. 11 | 12 | # This is a "service" rather than "target" so that we 13 | # don't need to say "systemctl restart nfs-utils.target". 14 | [Service] 15 | Type=oneshot 16 | RemainAfterExit=yes 17 | ExecStart=/bin/true 18 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/nss-lookup.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | # This exists mostly for compatibility with SysV/LSB units, and 9 | # implementations lacking socket/bus activation. 10 | 11 | [Unit] 12 | Description=Host and Network Name Lookups 13 | Documentation=man:systemd.special(7) 14 | RefuseManualStart=yes 15 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/nss-user-lookup.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | # This exists mostly for implementations lacking socket/bus 9 | # activation. 10 | 11 | [Unit] 12 | Description=User and Group Name Lookups 13 | Documentation=man:systemd.special(7) 14 | RefuseManualStart=yes 15 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/ntpd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Network Time Service 3 | After=ntpdate.service sntp.service 4 | Conflicts=systemd-timesyncd.service 5 | 6 | [Service] 7 | ExecStart=/usr/sbin/ntpd -g -n -f /var/lib/ntp/ntp.drift -u ntp:ntp 8 | PrivateTmp=true 9 | Restart=always 10 | 11 | [Install] 12 | WantedBy=multi-user.target 13 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/ntpdate.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Set time via NTP using ntpdate 3 | After=network.target nss-lookup.target 4 | Before=time-sync.target 5 | Wants=time-sync.target 6 | Conflicts=systemd-timesyncd.service 7 | 8 | [Service] 9 | Type=oneshot 10 | Environment="SERVER=0.coreos.pool.ntp.org 1.coreos.pool.ntp.org 2.coreos.pool.ntp.org 3.coreos.pool.ntp.org" 11 | ExecStart=/usr/sbin/ntpdate -b -u $SERVER 12 | RemainAfterExit=yes 13 | 14 | [Install] 15 | WantedBy=multi-user.target 16 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/oem-cloudinit.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Cloudinit from EC2-style metadata 3 | 4 | [Service] 5 | Type=oneshot 6 | ExecStart=/usr/bin/coreos-cloudinit --oem=ec2-compat 7 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/paths.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Paths 10 | Documentation=man:systemd.special(7) 11 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/polkit.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Authorization Manager 3 | Documentation=man:polkit(8) 4 | 5 | [Service] 6 | Type=dbus 7 | BusName=org.freedesktop.PolicyKit1 8 | ExecStart=/usr/lib/polkit-1/polkitd --no-debug 9 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/poweroff.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Power-Off 10 | Documentation=man:systemd.special(7) 11 | DefaultDependencies=no 12 | Requires=systemd-poweroff.service 13 | After=systemd-poweroff.service 14 | AllowIsolate=yes 15 | JobTimeoutSec=30min 16 | JobTimeoutAction=poweroff-force 17 | 18 | [Install] 19 | Alias=ctrl-alt-del.target 20 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/printer.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Printer 10 | Documentation=man:systemd.special(7) 11 | StopWhenUnneeded=yes 12 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/proc-fs-nfsd.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=NFSD configuration filesystem 3 | 4 | [Mount] 5 | What=nfsd 6 | Where=/proc/fs/nfsd 7 | Type=nfsd 8 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/proc-sys-fs-binfmt_misc.automount: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Arbitrary Executable File Formats File System Automount Point 10 | Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt 11 | Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems 12 | DefaultDependencies=no 13 | Before=sysinit.target 14 | ConditionPathExists=/proc/sys/fs/binfmt_misc/ 15 | ConditionPathIsReadWrite=/proc/sys/ 16 | 17 | [Automount] 18 | Where=/proc/sys/fs/binfmt_misc 19 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/proc-sys-fs-binfmt_misc.mount: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Arbitrary Executable File Formats File System 10 | Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt 11 | Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems 12 | DefaultDependencies=no 13 | 14 | [Mount] 15 | What=binfmt_misc 16 | Where=/proc/sys/fs/binfmt_misc 17 | Type=binfmt_misc 18 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/proc-xen.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Before=local-fs.target 3 | DefaultDependencies=false 4 | ConditionVirtualization=xen 5 | 6 | [Mount] 7 | What=xenfs 8 | Where=/proc/xen 9 | Type=xenfs 10 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/pwcheck.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=SASL pwcheck daemon 3 | 4 | [Service] 5 | Type=forking 6 | ExecStart=/usr/sbin/pwcheck 7 | 8 | [Install] 9 | WantedBy=multi-user.target 10 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/quotaon.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Enable File System Quotas 10 | Documentation=man:quotaon(8) 11 | DefaultDependencies=no 12 | After=systemd-quotacheck.service 13 | Before=local-fs.target shutdown.target 14 | ConditionPathExists=/usr/sbin/quotaon 15 | 16 | [Service] 17 | Type=oneshot 18 | RemainAfterExit=yes 19 | ExecStart=/usr/sbin/quotaon -aug 20 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/realmd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Realm and Domain Configuration 3 | Documentation=man:realmd(8) 4 | 5 | [Service] 6 | Type=dbus 7 | BusName=org.freedesktop.realmd 8 | ExecStart=/usr/lib/realmd/realmd 9 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/reboot.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Reboot 10 | Documentation=man:systemd.special(7) 11 | DefaultDependencies=no 12 | Requires=systemd-reboot.service 13 | After=systemd-reboot.service 14 | AllowIsolate=yes 15 | JobTimeoutSec=30min 16 | JobTimeoutAction=reboot-force 17 | 18 | [Install] 19 | Alias=ctrl-alt-del.target 20 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/remote-fs-pre.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Remote File Systems (Pre) 10 | Documentation=man:systemd.special(7) 11 | RefuseManualStart=yes 12 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/remote-fs.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Remote File Systems 10 | Documentation=man:systemd.special(7) 11 | After=remote-fs-pre.target 12 | DefaultDependencies=no 13 | Conflicts=shutdown.target 14 | 15 | [Install] 16 | WantedBy=multi-user.target 17 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/remount-root.service: -------------------------------------------------------------------------------- 1 | # Normally systemd-remount-fs does this but only if / is in fstab. 2 | # Since that is not the case in CoreOS we need this instead. 3 | 4 | [Unit] 5 | Description=Remount Root File System 6 | DefaultDependencies=no 7 | Conflicts=shutdown.target 8 | After=systemd-remount-fs.service 9 | Before=local-fs-pre.target local-fs.target shutdown.target 10 | Wants=local-fs-pre.target 11 | ConditionVirtualization=!container 12 | ConditionPathIsMountPoint=/ 13 | ConditionPathIsReadWrite=!/ 14 | 15 | [Service] 16 | Type=oneshot 17 | RemainAfterExit=yes 18 | ExecStart=/bin/mount -o remount,rw / 19 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/remount-usr.service: -------------------------------------------------------------------------------- 1 | # Normally systemd-remount-fs does this but only if /usr is in fstab. 2 | # Since that is not the case in CoreOS we need this instead. 3 | 4 | [Unit] 5 | Description=Remount /usr File System 6 | ConditionVirtualization=!container 7 | ConditionPathIsMountPoint=/usr 8 | ConditionPathIsReadWrite=!/usr 9 | 10 | [Service] 11 | Type=oneshot 12 | RemainAfterExit=yes 13 | ExecStart=/bin/mount -o remount,rw /usr 14 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/rescue.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Rescue Mode 10 | Documentation=man:systemd.special(7) 11 | Requires=sysinit.target rescue.service 12 | After=sysinit.target rescue.service 13 | AllowIsolate=yes 14 | 15 | [Install] 16 | Alias=kbrequest.target 17 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/rkt-gc.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Garbage Collection for rkt 3 | 4 | [Service] 5 | Environment=GRACE_PERIOD=24h 6 | Type=oneshot 7 | ExecStart=/usr/bin/rkt gc --grace-period=${GRACE_PERIOD} 8 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/rkt-gc.timer: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Periodic Garbage Collection for rkt 3 | 4 | [Timer] 5 | OnActiveSec=0s 6 | OnUnitActiveSec=12h 7 | 8 | [Install] 9 | WantedBy=default.target 10 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/rkt-metadata.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=rkt metadata service 3 | Documentation=http://github.com/coreos/rkt 4 | After=network.target rkt-metadata.socket 5 | Requires=rkt-metadata.socket 6 | 7 | [Service] 8 | ExecStart=/usr/bin/rkt metadata-service 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/rkt-metadata.socket: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=rkt metadata service socket 3 | PartOf=rkt-metadata.service 4 | 5 | [Socket] 6 | ListenStream=/run/rkt/metadata-svc.sock 7 | SocketMode=0660 8 | SocketUser=root 9 | SocketGroup=root 10 | RemoveOnStop=true 11 | 12 | [Install] 13 | WantedBy=sockets.target 14 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/rngd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Hardware RNG Entropy Gatherer Daemon 3 | 4 | [Service] 5 | ExecStart=/usr/sbin/rngd -f 6 | 7 | [Install] 8 | WantedBy=multi-user.target 9 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/rpc-idmapd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=NFSv4 ID-name mapping service 3 | Requires=var-lib-nfs-rpc_pipefs.mount 4 | After=var-lib-nfs-rpc_pipefs.mount 5 | 6 | BindsTo=nfs-server.service 7 | 8 | 9 | [Service] 10 | Type=forking 11 | ExecStart=/usr/sbin/rpc.idmapd $RPCIDMAPDARGS 12 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/rpc-mountd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=NFS Mount Daemon 3 | Requires=proc-fs-nfsd.mount 4 | After=proc-fs-nfsd.mount 5 | After=network.target 6 | BindsTo=nfs-server.service 7 | 8 | 9 | [Service] 10 | Type=forking 11 | ExecStart=/usr/sbin/rpc.mountd $RPCMOUNTDARGS 12 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/rpc-statd-notify.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Notify NFS peers of a restart 3 | Requires=network-online.target 4 | After=network-online.target nss-lookup.target 5 | 6 | # if we run an nfs server, it needs to be running before we 7 | # tell clients that it has restarted. 8 | After=nfs-server.service 9 | 10 | PartOf=nfs-utils.service 11 | 12 | 13 | [Service] 14 | Type=forking 15 | ExecStart=-/usr/sbin/sm-notify $SMNOTIFYARGS 16 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/rpc-statd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=NFS status monitor for NFSv2/3 locking. 3 | DefaultDependencies=no 4 | Conflicts=umount.target 5 | Requires=nss-lookup.target rpcbind.target 6 | After=network.target nss-lookup.target rpcbind.target 7 | 8 | PartOf=nfs-utils.service 9 | 10 | 11 | [Service] 12 | Type=forking 13 | PIDFile=/var/run/rpc.statd.pid 14 | ExecStart=/sbin/rpc.statd --no-notify $STATDARGS 15 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/rpcbind.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=RPC Bind 3 | After=network.target 4 | Wants=rpcbind.target 5 | Before=rpcbind.target 6 | 7 | [Service] 8 | Type=forking 9 | ExecStart=/sbin/rpcbind 10 | Restart=always 11 | 12 | [Install] 13 | WantedBy=multi-user.target 14 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/rpcbind.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | # This exists mostly for compatibility with SysV/LSB units, and 9 | # implementations lacking socket/bus activation. 10 | 11 | [Unit] 12 | Description=RPC Port Mapper 13 | Documentation=man:systemd.special(7) 14 | RefuseManualStart=yes 15 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/rpcbind.target.wants/rpcbind.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=RPC Bind 3 | After=network.target 4 | Wants=rpcbind.target 5 | Before=rpcbind.target 6 | 7 | [Service] 8 | Type=forking 9 | ExecStart=/sbin/rpcbind 10 | Restart=always 11 | 12 | [Install] 13 | WantedBy=multi-user.target 14 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/rsyncd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=rsync daemon 3 | After=networking.target 4 | 5 | [Service] 6 | Type=simple 7 | ExecStart=/usr/bin/rsync --daemon --no-detach 8 | StandardOutput=syslog 9 | StandardError=syslog 10 | 11 | [Install] 12 | WantedBy=multi-user.target 13 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/saslauthd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=SASL Authentication Daemon 3 | 4 | [Service] 5 | Type=forking 6 | PIDFile=/run/saslauthd/saslauthd.pid 7 | EnvironmentFile=/etc/conf.d/saslauthd 8 | ExecStart=/usr/sbin/saslauthd $SASLAUTHD_OPTS 9 | ExecStop=/bin/kill -15 $MAINPID 10 | PrivateTmp=true 11 | 12 | [Install] 13 | WantedBy=multi-user.target 14 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/setup-nsswitch.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Create /etc/nsswitch.conf 3 | Before=local-fs-pre.target systemd-tmpfiles-setup.service systemd-sysusers.service 4 | DefaultDependencies=no 5 | ConditionPathExists=!/etc/nsswitch.conf 6 | 7 | [Service] 8 | Type=oneshot 9 | ExecStart=/usr/bin/ln -s ../usr/share/baselayout/nsswitch.conf /etc/nsswitch.conf 10 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/shutdown.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Shutdown 10 | Documentation=man:systemd.special(7) 11 | DefaultDependencies=no 12 | RefuseManualStart=yes 13 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sigpwr.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Power Failure 10 | Documentation=man:systemd.special(7) 11 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sleep.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Sleep 10 | Documentation=man:systemd.special(7) 11 | DefaultDependencies=no 12 | RefuseManualStart=yes 13 | StopWhenUnneeded=yes 14 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/slices.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Slices 10 | Documentation=man:systemd.special(7) 11 | Wants=-.slice system.slice 12 | After=-.slice system.slice 13 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/smartcard.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Smart Card 10 | Documentation=man:systemd.special(7) 11 | StopWhenUnneeded=yes 12 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sntp.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Set time via SNTP 3 | After=network.target nss-lookup.target 4 | Before=time-sync.target 5 | Wants=time-sync.target 6 | Conflicts=systemd-timesyncd.service 7 | 8 | [Service] 9 | Type=oneshot 10 | Environment="SERVER=0.coreos.pool.ntp.org 1.coreos.pool.ntp.org 2.coreos.pool.ntp.org 3.coreos.pool.ntp.org" 11 | ExecStart=/usr/bin/sntp -s $SERVER 12 | RemainAfterExit=yes 13 | 14 | [Install] 15 | WantedBy=multi-user.target 16 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sockets.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Sockets 10 | Documentation=man:systemd.special(7) 11 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sockets.target.wants/dbus.socket: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=D-Bus System Message Bus Socket 3 | 4 | [Socket] 5 | ListenStream=/var/run/dbus/system_bus_socket 6 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sockets.target.wants/docker.socket: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Docker Socket for the API 3 | PartOf=docker.service 4 | 5 | [Socket] 6 | ListenStream=/var/run/docker.sock 7 | SocketMode=0660 8 | SocketUser=docker 9 | SocketGroup=docker 10 | 11 | [Install] 12 | WantedBy=sockets.target 13 | 14 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sockets.target.wants/rkt-metadata.socket: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=rkt metadata service socket 3 | PartOf=rkt-metadata.service 4 | 5 | [Socket] 6 | ListenStream=/run/rkt/metadata-svc.sock 7 | SocketMode=0660 8 | SocketUser=root 9 | SocketGroup=root 10 | RemoveOnStop=true 11 | 12 | [Install] 13 | WantedBy=sockets.target 14 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sockets.target.wants/sshd.socket: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=OpenSSH Server Socket 3 | Conflicts=sshd.service 4 | 5 | [Socket] 6 | ListenStream=22 7 | Accept=yes 8 | 9 | [Install] 10 | WantedBy=sockets.target 11 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sockets.target.wants/systemd-coredump.socket: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Process Core Dump Socket 10 | Documentation=man:systemd-coredump(8) 11 | DefaultDependencies=no 12 | 13 | [Socket] 14 | ListenSequentialPacket=/run/systemd/coredump 15 | SocketMode=0600 16 | Accept=yes 17 | MaxConnections=16 18 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sockets.target.wants/systemd-initctl.socket: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=/dev/initctl Compatibility Named Pipe 10 | Documentation=man:systemd-initctl.service(8) 11 | DefaultDependencies=no 12 | Before=sockets.target 13 | 14 | [Socket] 15 | ListenFIFO=/run/systemd/initctl/fifo 16 | Symlinks=/dev/initctl 17 | SocketMode=0600 18 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sockets.target.wants/systemd-journald-audit.socket: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Journal Audit Socket 10 | Documentation=man:systemd-journald.service(8) man:journald.conf(5) 11 | DefaultDependencies=no 12 | Before=sockets.target 13 | ConditionSecurity=audit 14 | ConditionCapability=CAP_AUDIT_READ 15 | 16 | [Socket] 17 | Service=systemd-journald.service 18 | ReceiveBuffer=128M 19 | ListenNetlink=audit 1 20 | PassCredentials=yes 21 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sockets.target.wants/systemd-networkd.socket: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Network Service Netlink Socket 10 | Documentation=man:systemd-networkd.service(8) man:rtnetlink(7) 11 | ConditionCapability=CAP_NET_ADMIN 12 | DefaultDependencies=no 13 | Before=sockets.target 14 | 15 | [Socket] 16 | ReceiveBuffer=8M 17 | ListenNetlink=route 1361 18 | PassCredentials=yes 19 | 20 | [Install] 21 | WantedBy=sockets.target 22 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sockets.target.wants/systemd-udevd-control.socket: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=udev Control Socket 10 | Documentation=man:systemd-udevd.service(8) man:udev(7) 11 | DefaultDependencies=no 12 | Before=sockets.target 13 | ConditionPathIsReadWrite=/sys 14 | 15 | [Socket] 16 | Service=systemd-udevd.service 17 | ListenSequentialPacket=/run/udev/control 18 | SocketMode=0600 19 | PassCredentials=yes 20 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sockets.target.wants/systemd-udevd-kernel.socket: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=udev Kernel Socket 10 | Documentation=man:systemd-udevd.service(8) man:udev(7) 11 | DefaultDependencies=no 12 | Before=sockets.target 13 | ConditionPathIsReadWrite=/sys 14 | 15 | [Socket] 16 | Service=systemd-udevd.service 17 | ReceiveBuffer=128M 18 | ListenNetlink=kobject-uevent 1 19 | PassCredentials=yes 20 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sound.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Sound Card 10 | Documentation=man:systemd.special(7) 11 | StopWhenUnneeded=yes 12 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/ssh-key-proc-cmdline.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Install an ssh key from /proc/cmdline 3 | 4 | [Service] 5 | Type=oneshot 6 | ExecStart=/usr/lib/coreos/ssh-key-proc-cmdline 7 | 8 | [Install] 9 | WantedBy=multi-user.target 10 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sshd-keygen.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Generate sshd host keys 3 | Before=sshd.service 4 | 5 | [Service] 6 | Type=oneshot 7 | RemainAfterExit=yes 8 | ExecStart=/usr/lib/coreos/sshd_keygen 9 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sshd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=OpenSSH server daemon 3 | After=syslog.target network.target auditd.service 4 | 5 | [Service] 6 | ExecStartPre=/usr/bin/ssh-keygen -A 7 | ExecStart=/usr/sbin/sshd -D -e 8 | ExecReload=/bin/kill -HUP $MAINPID 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sshd.socket: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=OpenSSH Server Socket 3 | Conflicts=sshd.service 4 | 5 | [Socket] 6 | ListenStream=22 7 | Accept=yes 8 | 9 | [Install] 10 | WantedBy=sockets.target 11 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sshd@.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=OpenSSH per-connection server daemon 3 | After=syslog.target auditd.service 4 | 5 | [Service] 6 | ExecStart=-/usr/sbin/sshd -i -e 7 | StandardInput=socket 8 | StandardError=syslog 9 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sshd@.service.d/sshd-keygen.conf: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Wants=sshd-keygen.service 3 | After=sshd-keygen.service 4 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sssd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=System Security Services Daemon 3 | # SSSD will not be started until syslog is 4 | After=syslog.target 5 | 6 | [Service] 7 | ExecStart=/usr/sbin/sssd -D -f 8 | # These two should be used with traditional UNIX forking daemons 9 | # consult systemd.service(5) for more details 10 | Type=forking 11 | PIDFile=/run/sssd.pid 12 | 13 | [Install] 14 | WantedBy=multi-user.target 15 | 16 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/suspend.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Suspend 10 | Documentation=man:systemd.special(7) 11 | DefaultDependencies=no 12 | BindsTo=systemd-suspend.service 13 | After=systemd-suspend.service 14 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/swap.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Swap 10 | Documentation=man:systemd.special(7) 11 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sys-fs-fuse-connections.mount: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=FUSE Control File System 10 | Documentation=https://www.kernel.org/doc/Documentation/filesystems/fuse.txt 11 | Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems 12 | DefaultDependencies=no 13 | ConditionPathExists=/sys/fs/fuse/connections 14 | ConditionCapability=CAP_SYS_ADMIN 15 | After=systemd-modules-load.service 16 | Before=sysinit.target 17 | 18 | [Mount] 19 | What=fusectl 20 | Where=/sys/fs/fuse/connections 21 | Type=fusectl 22 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sys-kernel-config.mount: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Configuration File System 10 | Documentation=https://www.kernel.org/doc/Documentation/filesystems/configfs/configfs.txt 11 | Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems 12 | DefaultDependencies=no 13 | ConditionPathExists=/sys/kernel/config 14 | ConditionCapability=CAP_SYS_RAWIO 15 | After=systemd-modules-load.service 16 | Before=sysinit.target 17 | 18 | [Mount] 19 | What=configfs 20 | Where=/sys/kernel/config 21 | Type=configfs 22 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sys-kernel-debug.mount: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Debug File System 10 | Documentation=https://www.kernel.org/doc/Documentation/filesystems/debugfs.txt 11 | Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems 12 | DefaultDependencies=no 13 | ConditionPathExists=/sys/kernel/debug 14 | ConditionCapability=CAP_SYS_RAWIO 15 | Before=sysinit.target 16 | 17 | [Mount] 18 | What=debugfs 19 | Where=/sys/kernel/debug 20 | Type=debugfs 21 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sysinit.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=System Initialization 10 | Documentation=man:systemd.special(7) 11 | Conflicts=emergency.service emergency.target 12 | Wants=local-fs.target swap.target 13 | After=local-fs.target swap.target emergency.service emergency.target 14 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sysinit.target.wants/clean-ca-certificates.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Clean up broken links in /etc/ssl/certs 3 | # Since other services depend on the certificate store run this early 4 | DefaultDependencies=no 5 | Wants=systemd-tmpfiles-setup.service 6 | After=systemd-tmpfiles-setup.service 7 | Before=sysinit.target 8 | ConditionPathIsReadWrite=/etc/ssl/certs 9 | 10 | [Service] 11 | Type=oneshot 12 | ExecStart=/usr/bin/find -L /etc/ssl/certs -type l -delete 13 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sysinit.target.wants/coreos-tmpfiles.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Create missing system files 3 | DefaultDependencies=no 4 | Before=sysinit.target systemd-sysusers.service 5 | ConditionPathIsReadWrite=/etc 6 | 7 | [Service] 8 | Type=oneshot 9 | ExecStart=/usr/sbin/coreos-tmpfiles 10 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sysinit.target.wants/cryptsetup.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Encrypted Volumes 10 | Documentation=man:systemd.special(7) 11 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sysinit.target.wants/dev-hugepages.mount: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Huge Pages File System 10 | Documentation=https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt 11 | Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems 12 | DefaultDependencies=no 13 | Before=sysinit.target 14 | ConditionPathExists=/sys/kernel/mm/hugepages 15 | ConditionCapability=CAP_SYS_ADMIN 16 | 17 | [Mount] 18 | What=hugetlbfs 19 | Where=/dev/hugepages 20 | Type=hugetlbfs 21 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sysinit.target.wants/dev-mqueue.mount: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=POSIX Message Queue File System 10 | Documentation=man:mq_overview(7) 11 | Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems 12 | DefaultDependencies=no 13 | Before=sysinit.target 14 | ConditionPathExists=/proc/sys/fs/mqueue 15 | ConditionCapability=CAP_SYS_ADMIN 16 | 17 | [Mount] 18 | What=mqueue 19 | Where=/dev/mqueue 20 | Type=mqueue 21 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sysinit.target.wants/kmod-static-nodes.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Create list of required static device nodes for the current kernel 10 | DefaultDependencies=no 11 | Before=sysinit.target systemd-tmpfiles-setup-dev.service 12 | ConditionCapability=CAP_SYS_MODULE 13 | ConditionFileNotEmpty=/lib/modules/%v/modules.devname 14 | 15 | [Service] 16 | Type=oneshot 17 | RemainAfterExit=yes 18 | ExecStart=/bin/kmod static-nodes --format=tmpfiles --output=/run/tmpfiles.d/kmod.conf 19 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sysinit.target.wants/ldconfig.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Rebuild Dynamic Linker Cache 10 | Documentation=man:ldconfig(8) 11 | DefaultDependencies=no 12 | Conflicts=shutdown.target 13 | After=systemd-remount-fs.service 14 | Before=sysinit.target shutdown.target systemd-update-done.service 15 | ConditionNeedsUpdate=|/etc 16 | ConditionFileNotEmpty=|!/etc/ld.so.cache 17 | 18 | [Service] 19 | Type=oneshot 20 | RemainAfterExit=yes 21 | ExecStart=/sbin/ldconfig -X 22 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sysinit.target.wants/proc-sys-fs-binfmt_misc.automount: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Arbitrary Executable File Formats File System Automount Point 10 | Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt 11 | Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems 12 | DefaultDependencies=no 13 | Before=sysinit.target 14 | ConditionPathExists=/proc/sys/fs/binfmt_misc/ 15 | ConditionPathIsReadWrite=/proc/sys/ 16 | 17 | [Automount] 18 | Where=/proc/sys/fs/binfmt_misc 19 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sysinit.target.wants/sys-fs-fuse-connections.mount: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=FUSE Control File System 10 | Documentation=https://www.kernel.org/doc/Documentation/filesystems/fuse.txt 11 | Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems 12 | DefaultDependencies=no 13 | ConditionPathExists=/sys/fs/fuse/connections 14 | ConditionCapability=CAP_SYS_ADMIN 15 | After=systemd-modules-load.service 16 | Before=sysinit.target 17 | 18 | [Mount] 19 | What=fusectl 20 | Where=/sys/fs/fuse/connections 21 | Type=fusectl 22 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sysinit.target.wants/sys-kernel-config.mount: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Configuration File System 10 | Documentation=https://www.kernel.org/doc/Documentation/filesystems/configfs/configfs.txt 11 | Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems 12 | DefaultDependencies=no 13 | ConditionPathExists=/sys/kernel/config 14 | ConditionCapability=CAP_SYS_RAWIO 15 | After=systemd-modules-load.service 16 | Before=sysinit.target 17 | 18 | [Mount] 19 | What=configfs 20 | Where=/sys/kernel/config 21 | Type=configfs 22 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sysinit.target.wants/sys-kernel-debug.mount: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Debug File System 10 | Documentation=https://www.kernel.org/doc/Documentation/filesystems/debugfs.txt 11 | Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems 12 | DefaultDependencies=no 13 | ConditionPathExists=/sys/kernel/debug 14 | ConditionCapability=CAP_SYS_RAWIO 15 | Before=sysinit.target 16 | 17 | [Mount] 18 | What=debugfs 19 | Where=/sys/kernel/debug 20 | Type=debugfs 21 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sysinit.target.wants/systemd-ask-password-console.path: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Dispatch Password Requests to Console Directory Watch 10 | Documentation=man:systemd-ask-password-console.service(8) 11 | DefaultDependencies=no 12 | Conflicts=shutdown.target 13 | After=plymouth-start.service 14 | Before=paths.target shutdown.target 15 | ConditionPathExists=!/run/plymouth/pid 16 | 17 | [Path] 18 | DirectoryNotEmpty=/run/systemd/ask-password 19 | MakeDirectory=yes 20 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sysinit.target.wants/systemd-journal-catalog-update.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Rebuild Journal Catalog 10 | Documentation=man:systemd-journald.service(8) man:journald.conf(5) 11 | DefaultDependencies=no 12 | Conflicts=shutdown.target 13 | After=local-fs.target 14 | Before=sysinit.target shutdown.target systemd-update-done.service 15 | ConditionNeedsUpdate=/etc 16 | 17 | [Service] 18 | Type=oneshot 19 | RemainAfterExit=yes 20 | ExecStart=/usr/bin/journalctl --update-catalog 21 | TimeoutSec=90s 22 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sysinit.target.wants/systemd-journal-flush.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Flush Journal to Persistent Storage 10 | Documentation=man:systemd-journald.service(8) man:journald.conf(5) 11 | DefaultDependencies=no 12 | Requires=systemd-journald.service 13 | After=systemd-journald.service 14 | After=systemd-remount-fs.service 15 | Before=systemd-user-sessions.service systemd-tmpfiles-setup.service 16 | RequiresMountsFor=/var/log/journal 17 | 18 | [Service] 19 | ExecStart=/usr/bin/journalctl --flush 20 | Type=oneshot 21 | RemainAfterExit=yes 22 | TimeoutSec=90s 23 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sysinit.target.wants/systemd-machine-id-commit.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Commit a transient machine-id on disk 10 | Documentation=man:systemd-machine-id-commit.service(8) 11 | DefaultDependencies=no 12 | Conflicts=shutdown.target 13 | Before=sysinit.target shutdown.target 14 | After=local-fs.target 15 | ConditionPathIsReadWrite=/etc 16 | ConditionPathIsMountPoint=/etc/machine-id 17 | 18 | [Service] 19 | Type=oneshot 20 | RemainAfterExit=yes 21 | ExecStart=/usr/bin/systemd-machine-id-setup --commit 22 | TimeoutSec=30s 23 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sysinit.target.wants/systemd-random-seed.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Load/Save Random Seed 10 | Documentation=man:systemd-random-seed.service(8) man:random(4) 11 | DefaultDependencies=no 12 | RequiresMountsFor=/var/lib/systemd/random-seed 13 | Conflicts=shutdown.target 14 | After=systemd-remount-fs.service 15 | Before=sysinit.target shutdown.target 16 | 17 | [Service] 18 | Type=oneshot 19 | RemainAfterExit=yes 20 | ExecStart=/usr/lib/systemd/systemd-random-seed load 21 | ExecStop=/usr/lib/systemd/systemd-random-seed save 22 | TimeoutSec=30s 23 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sysinit.target.wants/systemd-sysctl.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Apply Kernel Variables 10 | Documentation=man:systemd-sysctl.service(8) man:sysctl.d(5) 11 | DefaultDependencies=no 12 | Conflicts=shutdown.target 13 | After=systemd-modules-load.service 14 | Before=sysinit.target shutdown.target 15 | ConditionPathIsReadWrite=/proc/sys/ 16 | 17 | [Service] 18 | Type=oneshot 19 | RemainAfterExit=yes 20 | ExecStart=/usr/lib/systemd/systemd-sysctl 21 | TimeoutSec=90s 22 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sysinit.target.wants/systemd-sysusers.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Create System Users 10 | Documentation=man:sysusers.d(5) man:systemd-sysusers.service(8) 11 | DefaultDependencies=no 12 | Conflicts=shutdown.target 13 | After=systemd-remount-fs.service 14 | Before=sysinit.target shutdown.target systemd-update-done.service 15 | ConditionNeedsUpdate=/etc 16 | 17 | [Service] 18 | Type=oneshot 19 | RemainAfterExit=yes 20 | ExecStart=/usr/bin/systemd-sysusers 21 | TimeoutSec=90s 22 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sysinit.target.wants/systemd-tmpfiles-setup-dev.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Create Static Device Nodes in /dev 10 | Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8) 11 | DefaultDependencies=no 12 | Conflicts=shutdown.target 13 | After=systemd-sysusers.service 14 | Before=sysinit.target local-fs-pre.target systemd-udevd.service shutdown.target 15 | ConditionCapability=CAP_SYS_MODULE 16 | 17 | [Service] 18 | Type=oneshot 19 | RemainAfterExit=yes 20 | ExecStart=/usr/bin/systemd-tmpfiles --prefix=/dev --create --boot 21 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sysinit.target.wants/systemd-tmpfiles-setup.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Create Volatile Files and Directories 10 | Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8) 11 | DefaultDependencies=no 12 | Conflicts=shutdown.target 13 | After=local-fs.target systemd-sysusers.service 14 | Before=sysinit.target shutdown.target 15 | RefuseManualStop=yes 16 | 17 | [Service] 18 | Type=oneshot 19 | RemainAfterExit=yes 20 | ExecStart=/usr/bin/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev 21 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sysinit.target.wants/systemd-udev-trigger.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=udev Coldplug all Devices 10 | Documentation=man:udev(7) man:systemd-udevd.service(8) 11 | DefaultDependencies=no 12 | Wants=systemd-udevd.service 13 | After=systemd-udevd-kernel.socket systemd-udevd-control.socket systemd-hwdb-update.service 14 | Before=sysinit.target 15 | ConditionPathIsReadWrite=/sys 16 | 17 | [Service] 18 | Type=oneshot 19 | RemainAfterExit=yes 20 | ExecStart=/usr/bin/udevadm trigger --type=subsystems --action=add ; /usr/bin/udevadm trigger --type=devices --action=add 21 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sysinit.target.wants/systemd-update-done.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Update is Completed 10 | Documentation=man:systemd-update-done.service(8) 11 | DefaultDependencies=no 12 | Conflicts=shutdown.target 13 | After=local-fs.target 14 | Before=sysinit.target shutdown.target 15 | ConditionNeedsUpdate=|/etc 16 | ConditionNeedsUpdate=|/var 17 | 18 | [Service] 19 | Type=oneshot 20 | RemainAfterExit=yes 21 | ExecStart=/usr/lib/systemd/systemd-update-done 22 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sysinit.target.wants/systemd-update-utmp.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Update UTMP about System Boot/Shutdown 10 | Documentation=man:systemd-update-utmp.service(8) man:utmp(5) 11 | DefaultDependencies=no 12 | RequiresMountsFor=/var/log/wtmp 13 | Conflicts=shutdown.target 14 | After=systemd-remount-fs.service systemd-tmpfiles-setup.service auditd.service 15 | Before=sysinit.target shutdown.target 16 | 17 | [Service] 18 | Type=oneshot 19 | RemainAfterExit=yes 20 | ExecStart=/usr/lib/systemd/systemd-update-utmp reboot 21 | ExecStop=/usr/lib/systemd/systemd-update-utmp shutdown 22 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sysinit.target.wants/systemd-vconsole-setup.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Setup Virtual Console 10 | Documentation=man:systemd-vconsole-setup.service(8) man:vconsole.conf(5) 11 | DefaultDependencies=no 12 | Conflicts=shutdown.target 13 | Before=sysinit.target shutdown.target 14 | ConditionPathExists=/dev/tty0 15 | 16 | [Service] 17 | Type=oneshot 18 | RemainAfterExit=yes 19 | ExecStart=/usr/lib/systemd/systemd-vconsole-setup 20 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sysinit.target.wants/update-ca-certificates.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Update CA bundle at /etc/ssl/certs/ca-certificates.crt 3 | # Since other services depend on the certificate store run this early 4 | DefaultDependencies=no 5 | Wants=systemd-tmpfiles-setup.service clean-ca-certificates.service 6 | After=systemd-tmpfiles-setup.service clean-ca-certificates.service 7 | Before=sysinit.target 8 | ConditionPathIsReadWrite=/etc/ssl/certs 9 | # Do nothing if update-ca-certificates has never been run before 10 | ConditionPathIsSymbolicLink=!/etc/ssl/certs/ca-certificates.crt 11 | 12 | [Service] 13 | Type=oneshot 14 | ExecStart=/usr/sbin/update-ca-certificates --skip-rehash 15 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/sysinit.target.wants/xenserver-pv-version.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Set fake PV driver version for XenServer 3 | DefaultDependencies=false 4 | Requires=proc-xen.mount 5 | After=proc-xen.mount 6 | IgnoreOnIsolate=true 7 | ConditionVirtualization=xen 8 | 9 | [Service] 10 | Type=oneshot 11 | RemainAfterExit=true 12 | # Only attempt the write if 'attr' exists, it may not. 13 | ExecStart=/bin/sh -c \ 14 | 'if xenstore exists attr; then xenstore write \ 15 | attr/PVAddons/MajorVersion 6 \ 16 | attr/PVAddons/MinorVersion 2 \ 17 | attr/PVAddons/MicroVersion 0 \ 18 | data/updated 1; fi' 19 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/system-cloudinit@.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Load cloud-config from %f 3 | Requires=dbus.service 4 | After=dbus.service 5 | Before=system-config.target 6 | ConditionFileNotEmpty=%f 7 | 8 | [Service] 9 | Type=oneshot 10 | TimeoutSec=10min 11 | RemainAfterExit=yes 12 | ExecStart=/usr/bin/coreos-cloudinit --from-file=%f 13 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/system-config.target: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Load system-provided cloud configs 3 | 4 | # Generate /etc/environment 5 | Requires=coreos-setup-environment.service 6 | After=coreos-setup-environment.service 7 | 8 | # Load OEM cloud-config.yml 9 | Requires=system-cloudinit@usr-share-oem-cloud\x2dconfig.yml.service 10 | After=system-cloudinit@usr-share-oem-cloud\x2dconfig.yml.service 11 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/system-update.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=System Update 10 | Documentation=http://freedesktop.org/wiki/Software/systemd/SystemUpdates 11 | Documentation=man:systemd.special(7) man:systemd-system-update-generator(8) 12 | Requires=sysinit.target 13 | Conflicts=shutdown.target 14 | After=sysinit.target 15 | Before=shutdown.target 16 | AllowIsolate=yes 17 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/system.slice: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=System Slice 10 | Documentation=man:systemd.special(7) 11 | DefaultDependencies=no 12 | Before=slices.target 13 | Requires=-.slice 14 | After=-.slice 15 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-ask-password-console.path: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Dispatch Password Requests to Console Directory Watch 10 | Documentation=man:systemd-ask-password-console.service(8) 11 | DefaultDependencies=no 12 | Conflicts=shutdown.target 13 | After=plymouth-start.service 14 | Before=paths.target shutdown.target 15 | ConditionPathExists=!/run/plymouth/pid 16 | 17 | [Path] 18 | DirectoryNotEmpty=/run/systemd/ask-password 19 | MakeDirectory=yes 20 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-ask-password-console.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Dispatch Password Requests to Console 10 | Documentation=man:systemd-ask-password-console.service(8) 11 | DefaultDependencies=no 12 | Conflicts=shutdown.target 13 | After=plymouth-start.service systemd-vconsole-setup.service 14 | Before=shutdown.target 15 | ConditionPathExists=!/run/plymouth/pid 16 | 17 | [Service] 18 | ExecStart=/usr/bin/systemd-tty-ask-password-agent --watch --console 19 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-ask-password-wall.path: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Forward Password Requests to Wall Directory Watch 10 | Documentation=man:systemd-ask-password-console.service(8) 11 | DefaultDependencies=no 12 | Conflicts=shutdown.target 13 | Before=paths.target shutdown.target 14 | 15 | [Path] 16 | DirectoryNotEmpty=/run/systemd/ask-password 17 | MakeDirectory=yes 18 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-ask-password-wall.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Forward Password Requests to Wall 10 | Documentation=man:systemd-ask-password-console.service(8) 11 | After=systemd-user-sessions.service 12 | 13 | [Service] 14 | ExecStartPre=-/usr/bin/systemctl stop systemd-ask-password-console.path systemd-ask-password-console.service systemd-ask-password-plymouth.path systemd-ask-password-plymouth.service 15 | ExecStart=/usr/bin/systemd-tty-ask-password-agent --wall 16 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-backlight@.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Load/Save Screen Backlight Brightness of %i 10 | Documentation=man:systemd-backlight@.service(8) 11 | DefaultDependencies=no 12 | RequiresMountsFor=/var/lib/systemd/backlight 13 | Conflicts=shutdown.target 14 | After=systemd-remount-fs.service 15 | Before=sysinit.target shutdown.target 16 | 17 | [Service] 18 | Type=oneshot 19 | RemainAfterExit=yes 20 | ExecStart=/usr/lib/systemd/systemd-backlight load %i 21 | ExecStop=/usr/lib/systemd/systemd-backlight save %i 22 | TimeoutSec=90s 23 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-bootchart.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | # Note: it's usually a better idea to run systemd-bootchart via the 9 | # init= kernel command line switch. See the man page for details. 10 | 11 | [Unit] 12 | Description=Boot Process Profiler 13 | Documentation=man:systemd-bootchart.service(1) man:bootchart.conf(5) 14 | DefaultDependencies=no 15 | 16 | [Service] 17 | ExecStart=/usr/lib/systemd/systemd-bootchart -r 18 | 19 | [Install] 20 | WantedBy=sysinit.target 21 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-bus-proxyd.socket: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Legacy D-Bus Protocol Compatibility Socket 10 | 11 | [Socket] 12 | ListenStream=/var/run/dbus/system_bus_socket 13 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-coredump.socket: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Process Core Dump Socket 10 | Documentation=man:systemd-coredump(8) 11 | DefaultDependencies=no 12 | 13 | [Socket] 14 | ListenSequentialPacket=/run/systemd/coredump 15 | SocketMode=0600 16 | Accept=yes 17 | MaxConnections=16 18 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-coredump@.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Process Core Dump 10 | Documentation=man:systemd-coredump(8) 11 | DefaultDependencies=no 12 | RequiresMountsFor=/var/lib/systemd/coredump 13 | Conflicts=shutdown.target 14 | After=systemd-remount-fs.service systemd-journald.socket 15 | Requires=systemd-journald.socket 16 | Before=shutdown.target 17 | 18 | [Service] 19 | ExecStart=-/usr/lib/systemd/systemd-coredump 20 | Nice=9 21 | OOMScoreAdjust=500 22 | PrivateNetwork=yes 23 | ProtectSystem=full 24 | RuntimeMaxSec=5min 25 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-exit.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Exit the Session 10 | Documentation=man:systemd.special(7) 11 | DefaultDependencies=no 12 | Requires=shutdown.target 13 | After=shutdown.target 14 | 15 | [Service] 16 | Type=oneshot 17 | ExecStart=/usr/bin/systemctl --force exit 18 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-firstboot.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=First Boot Wizard 10 | Documentation=man:systemd-firstboot(1) 11 | DefaultDependencies=no 12 | Conflicts=shutdown.target 13 | After=systemd-remount-fs.service 14 | Before=systemd-sysusers.service sysinit.target shutdown.target 15 | ConditionPathIsReadWrite=/etc 16 | ConditionFirstBoot=yes 17 | 18 | [Service] 19 | Type=oneshot 20 | RemainAfterExit=yes 21 | ExecStart=/usr/bin/systemd-firstboot --prompt-locale --prompt-timezone --prompt-root-password 22 | StandardOutput=tty 23 | StandardInput=tty 24 | StandardError=tty 25 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-fsck-root.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=File System Check on Root Device 10 | Documentation=man:systemd-fsck-root.service(8) 11 | DefaultDependencies=no 12 | Before=local-fs.target shutdown.target 13 | ConditionPathIsReadWrite=!/ 14 | 15 | [Service] 16 | Type=oneshot 17 | RemainAfterExit=yes 18 | ExecStart=/usr/lib/systemd/systemd-fsck 19 | TimeoutSec=0 20 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-fsck@.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=File System Check on %f 10 | Documentation=man:systemd-fsck@.service(8) 11 | DefaultDependencies=no 12 | BindsTo=%i.device 13 | After=%i.device systemd-fsck-root.service local-fs-pre.target 14 | Before=systemd-quotacheck.service shutdown.target 15 | 16 | [Service] 17 | Type=oneshot 18 | RemainAfterExit=yes 19 | ExecStart=/usr/lib/systemd/systemd-fsck %f 20 | TimeoutSec=0 21 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-halt.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Halt 10 | Documentation=man:systemd-halt.service(8) 11 | DefaultDependencies=no 12 | Requires=shutdown.target umount.target final.target 13 | After=shutdown.target umount.target final.target 14 | 15 | [Service] 16 | Type=oneshot 17 | ExecStart=/usr/bin/systemctl --force halt 18 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-hibernate-resume@.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Resume from hibernation using device %f 10 | Documentation=man:systemd-hibernate-resume@.service(8) 11 | DefaultDependencies=no 12 | BindsTo=%i.device 13 | Wants=local-fs-pre.target 14 | After=%i.device 15 | Before=local-fs-pre.target 16 | ConditionPathExists=/etc/initrd-release 17 | 18 | [Service] 19 | Type=oneshot 20 | ExecStart=/usr/lib/systemd/systemd-hibernate-resume %f 21 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-hibernate.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Hibernate 10 | Documentation=man:systemd-suspend.service(8) 11 | DefaultDependencies=no 12 | Requires=sleep.target 13 | After=sleep.target 14 | 15 | [Service] 16 | Type=oneshot 17 | ExecStart=/usr/lib/systemd/systemd-sleep hibernate 18 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-hybrid-sleep.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Hybrid Suspend+Hibernate 10 | Documentation=man:systemd-suspend.service(8) 11 | DefaultDependencies=no 12 | Requires=sleep.target 13 | After=sleep.target 14 | 15 | [Service] 16 | Type=oneshot 17 | ExecStart=/usr/lib/systemd/systemd-sleep hybrid-sleep 18 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-initctl.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=/dev/initctl Compatibility Daemon 10 | Documentation=man:systemd-initctl.service(8) 11 | DefaultDependencies=no 12 | 13 | [Service] 14 | ExecStart=/usr/lib/systemd/systemd-initctl 15 | NotifyAccess=all 16 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-initctl.socket: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=/dev/initctl Compatibility Named Pipe 10 | Documentation=man:systemd-initctl.service(8) 11 | DefaultDependencies=no 12 | Before=sockets.target 13 | 14 | [Socket] 15 | ListenFIFO=/run/systemd/initctl/fifo 16 | Symlinks=/dev/initctl 17 | SocketMode=0600 18 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-journal-catalog-update.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Rebuild Journal Catalog 10 | Documentation=man:systemd-journald.service(8) man:journald.conf(5) 11 | DefaultDependencies=no 12 | Conflicts=shutdown.target 13 | After=local-fs.target 14 | Before=sysinit.target shutdown.target systemd-update-done.service 15 | ConditionNeedsUpdate=/etc 16 | 17 | [Service] 18 | Type=oneshot 19 | RemainAfterExit=yes 20 | ExecStart=/usr/bin/journalctl --update-catalog 21 | TimeoutSec=90s 22 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-journal-flush.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Flush Journal to Persistent Storage 10 | Documentation=man:systemd-journald.service(8) man:journald.conf(5) 11 | DefaultDependencies=no 12 | Requires=systemd-journald.service 13 | After=systemd-journald.service 14 | After=systemd-remount-fs.service 15 | Before=systemd-user-sessions.service systemd-tmpfiles-setup.service 16 | RequiresMountsFor=/var/log/journal 17 | 18 | [Service] 19 | ExecStart=/usr/bin/journalctl --flush 20 | Type=oneshot 21 | RemainAfterExit=yes 22 | TimeoutSec=90s 23 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-journal-gatewayd.socket: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Journal Gateway Service Socket 10 | Documentation=man:systemd-journal-gatewayd(8) 11 | 12 | [Socket] 13 | ListenStream=19531 14 | 15 | [Install] 16 | WantedBy=sockets.target 17 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-journal-remote.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Journal Remote Sink Service 10 | Documentation=man:systemd-journal-remote(8) man:journal-remote.conf(5) 11 | Requires=systemd-journal-remote.socket 12 | 13 | [Service] 14 | ExecStart=/usr/lib/systemd/systemd-journal-remote \ 15 | --listen-https=-3 \ 16 | --output=/var/log/journal/remote/ 17 | User=systemd-journal-remote 18 | Group=systemd-journal-remote 19 | PrivateTmp=yes 20 | PrivateDevices=yes 21 | PrivateNetwork=yes 22 | WatchdogSec=3min 23 | 24 | [Install] 25 | Also=systemd-journal-remote.socket 26 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-journal-remote.socket: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Journal Remote Sink Socket 10 | 11 | [Socket] 12 | ListenStream=19532 13 | 14 | [Install] 15 | WantedBy=sockets.target 16 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-journald-audit.socket: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Journal Audit Socket 10 | Documentation=man:systemd-journald.service(8) man:journald.conf(5) 11 | DefaultDependencies=no 12 | Before=sockets.target 13 | ConditionSecurity=audit 14 | ConditionCapability=CAP_AUDIT_READ 15 | 16 | [Socket] 17 | Service=systemd-journald.service 18 | ReceiveBuffer=128M 19 | ListenNetlink=audit 1 20 | PassCredentials=yes 21 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-kexec.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Reboot via kexec 10 | Documentation=man:systemd-halt.service(8) 11 | DefaultDependencies=no 12 | Requires=shutdown.target umount.target final.target 13 | After=shutdown.target umount.target final.target 14 | 15 | [Service] 16 | Type=oneshot 17 | ExecStart=/usr/bin/systemctl --force kexec 18 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-machine-id-commit.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Commit a transient machine-id on disk 10 | Documentation=man:systemd-machine-id-commit.service(8) 11 | DefaultDependencies=no 12 | Conflicts=shutdown.target 13 | Before=sysinit.target shutdown.target 14 | After=local-fs.target 15 | ConditionPathIsReadWrite=/etc 16 | ConditionPathIsMountPoint=/etc/machine-id 17 | 18 | [Service] 19 | Type=oneshot 20 | RemainAfterExit=yes 21 | ExecStart=/usr/bin/systemd-machine-id-setup --commit 22 | TimeoutSec=30s 23 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-networkd-wait-online.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Wait for Network to be Configured 10 | Documentation=man:systemd-networkd-wait-online.service(8) 11 | DefaultDependencies=no 12 | Conflicts=shutdown.target 13 | Requisite=systemd-networkd.service 14 | After=systemd-networkd.service 15 | Before=network-online.target 16 | 17 | [Service] 18 | Type=oneshot 19 | ExecStart=/usr/lib/systemd/systemd-networkd-wait-online 20 | RemainAfterExit=yes 21 | 22 | [Install] 23 | WantedBy=network-online.target 24 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-networkd.socket: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Network Service Netlink Socket 10 | Documentation=man:systemd-networkd.service(8) man:rtnetlink(7) 11 | ConditionCapability=CAP_NET_ADMIN 12 | DefaultDependencies=no 13 | Before=sockets.target 14 | 15 | [Socket] 16 | ReceiveBuffer=8M 17 | ListenNetlink=route 1361 18 | PassCredentials=yes 19 | 20 | [Install] 21 | WantedBy=sockets.target 22 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-poweroff.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Power-Off 10 | Documentation=man:systemd-halt.service(8) 11 | DefaultDependencies=no 12 | Requires=shutdown.target umount.target final.target 13 | After=shutdown.target umount.target final.target 14 | 15 | [Service] 16 | Type=oneshot 17 | ExecStart=/usr/bin/systemctl --force poweroff 18 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-quotacheck.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=File System Quota Check 10 | Documentation=man:systemd-quotacheck.service(8) 11 | DefaultDependencies=no 12 | After=systemd-remount-fs.service 13 | Before=local-fs.target shutdown.target 14 | ConditionPathExists=/usr/sbin/quotacheck 15 | 16 | [Service] 17 | Type=oneshot 18 | RemainAfterExit=yes 19 | ExecStart=/usr/lib/systemd/systemd-quotacheck 20 | TimeoutSec=0 21 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-random-seed.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Load/Save Random Seed 10 | Documentation=man:systemd-random-seed.service(8) man:random(4) 11 | DefaultDependencies=no 12 | RequiresMountsFor=/var/lib/systemd/random-seed 13 | Conflicts=shutdown.target 14 | After=systemd-remount-fs.service 15 | Before=sysinit.target shutdown.target 16 | 17 | [Service] 18 | Type=oneshot 19 | RemainAfterExit=yes 20 | ExecStart=/usr/lib/systemd/systemd-random-seed load 21 | ExecStop=/usr/lib/systemd/systemd-random-seed save 22 | TimeoutSec=30s 23 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-reboot.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Reboot 10 | Documentation=man:systemd-halt.service(8) 11 | DefaultDependencies=no 12 | Requires=shutdown.target umount.target final.target 13 | After=shutdown.target umount.target final.target 14 | 15 | [Service] 16 | Type=oneshot 17 | ExecStart=/usr/bin/systemctl --force reboot 18 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-remount-fs.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Remount Root and Kernel File Systems 10 | Documentation=man:systemd-remount-fs.service(8) 11 | Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems 12 | DefaultDependencies=no 13 | Conflicts=shutdown.target 14 | After=systemd-fsck-root.service 15 | Before=local-fs-pre.target local-fs.target shutdown.target 16 | Wants=local-fs-pre.target 17 | ConditionPathExists=/etc/fstab 18 | 19 | [Service] 20 | Type=oneshot 21 | RemainAfterExit=yes 22 | ExecStart=/usr/lib/systemd/systemd-remount-fs 23 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-rfkill.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Load/Save RF Kill Switch Status 10 | Documentation=man:systemd-rfkill.service(8) 11 | DefaultDependencies=no 12 | RequiresMountsFor=/var/lib/systemd/rfkill 13 | BindsTo=sys-devices-virtual-misc-rfkill.device 14 | Conflicts=shutdown.target 15 | After=sys-devices-virtual-misc-rfkill.device systemd-remount-fs.service 16 | Before=shutdown.target 17 | 18 | [Service] 19 | Type=notify 20 | ExecStart=/usr/lib/systemd/systemd-rfkill 21 | TimeoutSec=30s 22 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-rfkill.socket: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Load/Save RF Kill Switch Status /dev/rfkill Watch 10 | Documentation=man:systemd-rfkill.socket(8) 11 | DefaultDependencies=no 12 | BindsTo=sys-devices-virtual-misc-rfkill.device 13 | After=sys-devices-virtual-misc-rfkill.device 14 | Conflicts=shutdown.target 15 | Before=shutdown.target 16 | 17 | [Socket] 18 | ListenSpecial=/dev/rfkill 19 | Writable=yes 20 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-suspend.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Suspend 10 | Documentation=man:systemd-suspend.service(8) 11 | DefaultDependencies=no 12 | Requires=sleep.target 13 | After=sleep.target 14 | 15 | [Service] 16 | Type=oneshot 17 | ExecStart=/usr/lib/systemd/systemd-sleep suspend 18 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-sysctl.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Apply Kernel Variables 10 | Documentation=man:systemd-sysctl.service(8) man:sysctl.d(5) 11 | DefaultDependencies=no 12 | Conflicts=shutdown.target 13 | After=systemd-modules-load.service 14 | Before=sysinit.target shutdown.target 15 | ConditionPathIsReadWrite=/proc/sys/ 16 | 17 | [Service] 18 | Type=oneshot 19 | RemainAfterExit=yes 20 | ExecStart=/usr/lib/systemd/systemd-sysctl 21 | TimeoutSec=90s 22 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-sysusers.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Create System Users 10 | Documentation=man:sysusers.d(5) man:systemd-sysusers.service(8) 11 | DefaultDependencies=no 12 | Conflicts=shutdown.target 13 | After=systemd-remount-fs.service 14 | Before=sysinit.target shutdown.target systemd-update-done.service 15 | ConditionNeedsUpdate=/etc 16 | 17 | [Service] 18 | Type=oneshot 19 | RemainAfterExit=yes 20 | ExecStart=/usr/bin/systemd-sysusers 21 | TimeoutSec=90s 22 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-timedated.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Time & Date Service 10 | Documentation=man:systemd-timedated.service(8) man:localtime(5) 11 | Documentation=http://www.freedesktop.org/wiki/Software/systemd/timedated 12 | 13 | [Service] 14 | ExecStart=/usr/lib/systemd/systemd-timedated 15 | BusName=org.freedesktop.timedate1 16 | CapabilityBoundingSet=CAP_SYS_TIME 17 | WatchdogSec=3min 18 | PrivateTmp=yes 19 | ProtectSystem=yes 20 | ProtectHome=yes 21 | MemoryDenyWriteExecute=yes 22 | SystemCallFilter=~@cpu-emulation @debug @keyring @module @mount @obsolete @raw-io 23 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-tmpfiles-clean.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Cleanup of Temporary Directories 10 | Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8) 11 | DefaultDependencies=no 12 | Conflicts=shutdown.target 13 | After=local-fs.target time-sync.target 14 | Before=shutdown.target 15 | 16 | [Service] 17 | Type=oneshot 18 | ExecStart=/usr/bin/systemd-tmpfiles --clean 19 | IOSchedulingClass=idle 20 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-tmpfiles-clean.timer: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Daily Cleanup of Temporary Directories 10 | Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8) 11 | 12 | [Timer] 13 | OnBootSec=15min 14 | OnUnitActiveSec=1d 15 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-tmpfiles-setup-dev.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Create Static Device Nodes in /dev 10 | Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8) 11 | DefaultDependencies=no 12 | Conflicts=shutdown.target 13 | After=systemd-sysusers.service 14 | Before=sysinit.target local-fs-pre.target systemd-udevd.service shutdown.target 15 | ConditionCapability=CAP_SYS_MODULE 16 | 17 | [Service] 18 | Type=oneshot 19 | RemainAfterExit=yes 20 | ExecStart=/usr/bin/systemd-tmpfiles --prefix=/dev --create --boot 21 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-tmpfiles-setup.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Create Volatile Files and Directories 10 | Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8) 11 | DefaultDependencies=no 12 | Conflicts=shutdown.target 13 | After=local-fs.target systemd-sysusers.service 14 | Before=sysinit.target shutdown.target 15 | RefuseManualStop=yes 16 | 17 | [Service] 18 | Type=oneshot 19 | RemainAfterExit=yes 20 | ExecStart=/usr/bin/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev 21 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-udev-trigger.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=udev Coldplug all Devices 10 | Documentation=man:udev(7) man:systemd-udevd.service(8) 11 | DefaultDependencies=no 12 | Wants=systemd-udevd.service 13 | After=systemd-udevd-kernel.socket systemd-udevd-control.socket systemd-hwdb-update.service 14 | Before=sysinit.target 15 | ConditionPathIsReadWrite=/sys 16 | 17 | [Service] 18 | Type=oneshot 19 | RemainAfterExit=yes 20 | ExecStart=/usr/bin/udevadm trigger --type=subsystems --action=add ; /usr/bin/udevadm trigger --type=devices --action=add 21 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-udevd-control.socket: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=udev Control Socket 10 | Documentation=man:systemd-udevd.service(8) man:udev(7) 11 | DefaultDependencies=no 12 | Before=sockets.target 13 | ConditionPathIsReadWrite=/sys 14 | 15 | [Socket] 16 | Service=systemd-udevd.service 17 | ListenSequentialPacket=/run/udev/control 18 | SocketMode=0600 19 | PassCredentials=yes 20 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-udevd-kernel.socket: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=udev Kernel Socket 10 | Documentation=man:systemd-udevd.service(8) man:udev(7) 11 | DefaultDependencies=no 12 | Before=sockets.target 13 | ConditionPathIsReadWrite=/sys 14 | 15 | [Socket] 16 | Service=systemd-udevd.service 17 | ReceiveBuffer=128M 18 | ListenNetlink=kobject-uevent 1 19 | PassCredentials=yes 20 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-update-done.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Update is Completed 10 | Documentation=man:systemd-update-done.service(8) 11 | DefaultDependencies=no 12 | Conflicts=shutdown.target 13 | After=local-fs.target 14 | Before=sysinit.target shutdown.target 15 | ConditionNeedsUpdate=|/etc 16 | ConditionNeedsUpdate=|/var 17 | 18 | [Service] 19 | Type=oneshot 20 | RemainAfterExit=yes 21 | ExecStart=/usr/lib/systemd/systemd-update-done 22 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-update-utmp-runlevel.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Update UTMP about System Runlevel Changes 10 | Documentation=man:systemd-update-utmp.service(8) man:utmp(5) 11 | DefaultDependencies=no 12 | RequiresMountsFor=/var/log/wtmp 13 | Conflicts=shutdown.target 14 | Requisite=systemd-update-utmp.service 15 | After=systemd-update-utmp.service 16 | After=runlevel1.target runlevel2.target runlevel3.target runlevel4.target runlevel5.target 17 | Before=shutdown.target 18 | 19 | [Service] 20 | Type=oneshot 21 | ExecStart=/usr/lib/systemd/systemd-update-utmp runlevel 22 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-update-utmp.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Update UTMP about System Boot/Shutdown 10 | Documentation=man:systemd-update-utmp.service(8) man:utmp(5) 11 | DefaultDependencies=no 12 | RequiresMountsFor=/var/log/wtmp 13 | Conflicts=shutdown.target 14 | After=systemd-remount-fs.service systemd-tmpfiles-setup.service auditd.service 15 | Before=sysinit.target shutdown.target 16 | 17 | [Service] 18 | Type=oneshot 19 | RemainAfterExit=yes 20 | ExecStart=/usr/lib/systemd/systemd-update-utmp reboot 21 | ExecStop=/usr/lib/systemd/systemd-update-utmp shutdown 22 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-user-sessions.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Permit User Sessions 10 | Documentation=man:systemd-user-sessions.service(8) 11 | After=remote-fs.target nss-user-lookup.target network.target 12 | 13 | [Service] 14 | Type=oneshot 15 | RemainAfterExit=yes 16 | ExecStart=/usr/lib/systemd/systemd-user-sessions start 17 | ExecStop=/usr/lib/systemd/systemd-user-sessions stop 18 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/systemd-vconsole-setup.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Setup Virtual Console 10 | Documentation=man:systemd-vconsole-setup.service(8) man:vconsole.conf(5) 11 | DefaultDependencies=no 12 | Conflicts=shutdown.target 13 | Before=sysinit.target shutdown.target 14 | ConditionPathExists=/dev/tty0 15 | 16 | [Service] 17 | Type=oneshot 18 | RemainAfterExit=yes 19 | ExecStart=/usr/lib/systemd/systemd-vconsole-setup 20 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/tcsd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=TCG Core Services Daemon 3 | ConditionPathExists=/dev/tpm0 4 | 5 | [Service] 6 | User=tss 7 | ExecStart=/usr/sbin/tcsd -f 8 | 9 | [Install] 10 | WantedBy=multi-user.target 11 | 12 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/time-sync.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=System Time Synchronized 10 | Documentation=man:systemd.special(7) 11 | RefuseManualStart=yes 12 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/timers.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Timers 10 | Documentation=man:systemd.special(7) 11 | 12 | DefaultDependencies=no 13 | Conflicts=shutdown.target 14 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/timers.target.wants/systemd-tmpfiles-clean.timer: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Daily Cleanup of Temporary Directories 10 | Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8) 11 | 12 | [Timer] 13 | OnBootSec=15min 14 | OnUnitActiveSec=1d 15 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/tmp.mount: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Temporary Directory 10 | Documentation=man:hier(7) 11 | Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems 12 | ConditionPathIsSymbolicLink=!/tmp 13 | DefaultDependencies=no 14 | Conflicts=umount.target 15 | Before=local-fs.target umount.target 16 | After=swap.target 17 | 18 | [Mount] 19 | What=tmpfs 20 | Where=/tmp 21 | Type=tmpfs 22 | Options=mode=1777,strictatime,nosuid,nodev 23 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/tpmd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=TPM remote access daemon 3 | Requires=tcsd.service 4 | 5 | [Service] 6 | ExecStart=/bin/tpmd 23179 7 | Restart=always 8 | RestartSec=0 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/umount.target: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Unmount All Filesystems 10 | Documentation=man:systemd.special(7) 11 | DefaultDependencies=no 12 | RefuseManualStart=yes 13 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/update-ca-certificates.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Update CA bundle at /etc/ssl/certs/ca-certificates.crt 3 | # Since other services depend on the certificate store run this early 4 | DefaultDependencies=no 5 | Wants=systemd-tmpfiles-setup.service clean-ca-certificates.service 6 | After=systemd-tmpfiles-setup.service clean-ca-certificates.service 7 | Before=sysinit.target 8 | ConditionPathIsReadWrite=/etc/ssl/certs 9 | # Do nothing if update-ca-certificates has never been run before 10 | ConditionPathIsSymbolicLink=!/etc/ssl/certs/ca-certificates.crt 11 | 12 | [Service] 13 | Type=oneshot 14 | ExecStart=/usr/sbin/update-ca-certificates --skip-rehash 15 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/update-engine-stub.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Update Engine Stub 3 | ConditionVirtualization=!container 4 | ConditionPathExists=/usr/.noupdate 5 | 6 | [Service] 7 | Type=oneshot 8 | ExecStart=/usr/sbin/update_engine_stub 9 | 10 | [Install] 11 | WantedBy=default.target 12 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/update-engine-stub.timer: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Update Engine Stub Timer 3 | ConditionVirtualization=!container 4 | ConditionPathExists=/usr/.noupdate 5 | 6 | [Timer] 7 | OnBootSec=7minutes 8 | OnActiveSec=41minutes 9 | Unit=update-engine-stub.service 10 | 11 | [Install] 12 | WantedBy=default.target 13 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/update-engine.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Update Engine 3 | ConditionVirtualization=!container 4 | ConditionPathExists=!/usr/.noupdate 5 | 6 | [Service] 7 | Type=dbus 8 | BusName=com.coreos.update1 9 | ExecStart=/usr/sbin/update_engine -foreground -logtostderr 10 | BlockIOWeight=100 11 | Restart=always 12 | RestartSec=30 13 | 14 | [Install] 15 | WantedBy=default.target 16 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/user-cloudinit-proc-cmdline.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Load cloud-config from url defined in /proc/cmdline 3 | Requires=coreos-setup-environment.service 4 | After=coreos-setup-environment.service 5 | After=system-config.target 6 | Before=user-config.target 7 | ConditionKernelCommandLine=cloud-config-url 8 | 9 | [Service] 10 | Type=oneshot 11 | TimeoutSec=10min 12 | RemainAfterExit=yes 13 | EnvironmentFile=-/etc/environment 14 | ExecStart=/usr/bin/coreos-cloudinit --from-proc-cmdline 15 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/user-cloudinit@.path: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Watch for a cloud-config at %f 3 | 4 | [Path] 5 | PathExists=%f 6 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/user-cloudinit@.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Load cloud-config from %f 3 | Requires=coreos-setup-environment.service 4 | After=coreos-setup-environment.service 5 | After=system-config.target 6 | Before=user-config.target 7 | ConditionFileNotEmpty=%f 8 | 9 | [Service] 10 | Type=oneshot 11 | TimeoutSec=10min 12 | RemainAfterExit=yes 13 | EnvironmentFile=-/etc/environment 14 | ExecStart=/usr/bin/coreos-cloudinit --from-file=%f 15 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/user-config-ovfenv.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Load cloud-config from /media/ovfenv 3 | Requires=coreos-setup-environment.service 4 | After=coreos-setup-environment.service system-config.target 5 | Before=user-config.target 6 | After=user-config-vmw-tools.service 7 | 8 | [Service] 9 | Type=oneshot 10 | TimeoutSec=10min 11 | RemainAfterExit=yes 12 | EnvironmentFile=-/etc/environment 13 | ExecStart=/usr/bin/coreos-cloudinit --from-vmware-ovf-env=/media/ovfenv/ovf-env.xml 14 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/user-config.target: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Load user-provided cloud configs 3 | Requires=system-config.target 4 | After=system-config.target 5 | 6 | # Watch for configs at a couple common paths 7 | Requires=user-cloudinit@var-lib-coreos\x2dinstall-user_data.path 8 | After=user-cloudinit@var-lib-coreos\x2dinstall-user_data.path 9 | 10 | Requires=user-cloudinit-proc-cmdline.service 11 | After=user-cloudinit-proc-cmdline.service 12 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/user-configvirtfs.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Load cloud-config from /media/configvirtfs 3 | Requires=coreos-setup-environment.service 4 | After=coreos-setup-environment.service 5 | Before=user-config.target 6 | 7 | [Service] 8 | Type=oneshot 9 | TimeoutSec=10min 10 | RemainAfterExit=yes 11 | EnvironmentFile=-/etc/environment 12 | ExecStart=/usr/bin/coreos-cloudinit --from-configdrive=/media/configvirtfs 13 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/user.slice: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=User and Session Slice 10 | Documentation=man:systemd.special(7) 11 | Before=slices.target 12 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/user@.service: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=User Manager for UID %i 10 | After=systemd-user-sessions.service 11 | 12 | [Service] 13 | User=%i 14 | PAMName=systemd-user 15 | Type=notify 16 | ExecStart=-/usr/lib/systemd/systemd --user 17 | Slice=user-%i.slice 18 | KillMode=mixed 19 | Delegate=yes 20 | TasksMax=infinity 21 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/usr-share-oem.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | DefaultDependencies=no 3 | Wants=addon-run@usr-share-oem.service addon-config@usr-share-oem.service 4 | Before=addon-run@usr-share-oem.service addon-config@usr-share-oem.service 5 | Conflicts=umount.target 6 | Before=local-fs.target umount.target ldconfig.service 7 | ConditionVirtualization=!container 8 | ConditionPathExists=!/usr/.noupdate 9 | 10 | [Mount] 11 | What=/dev/disk/by-label/OEM 12 | Where=/usr/share/oem 13 | Options=nodev,commit=600 14 | Type=ext4 15 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/uuidd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Daemon for generating UUIDs 3 | Requires=uuidd.socket 4 | 5 | [Service] 6 | ExecStart=/usr/sbin/uuidd --socket-activation 7 | Restart=no 8 | User=uuidd 9 | Group=uuidd 10 | 11 | [Install] 12 | Also=uuidd.socket 13 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/uuidd.socket: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=UUID daemon activation socket 3 | 4 | [Socket] 5 | ListenStream=/var/lib/uuidd/request 6 | 7 | [Install] 8 | WantedBy=sockets.target 9 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/var-lib-machines.mount: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | 8 | [Unit] 9 | Description=Virtual Machine and Container Storage 10 | ConditionPathExists=/var/lib/machines.raw 11 | 12 | [Mount] 13 | What=/var/lib/machines.raw 14 | Where=/var/lib/machines 15 | Type=btrfs 16 | Options=loop 17 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/var-lib-nfs-rpc_pipefs.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=RPC Pipe File System 3 | DefaultDependencies=no 4 | Conflicts=umount.target 5 | 6 | [Mount] 7 | What=sunrpc 8 | Where=/var/lib/nfs/rpc_pipefs 9 | Type=rpc_pipefs 10 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/virtfs@.service: -------------------------------------------------------------------------------- 1 | # This is a service unit that calls mount because mount units cannot use 2 | # templates. Alternatively udev could use set the RUN attribute that and a 3 | # script could generate a mount unit at run time but this seems better. 4 | 5 | [Unit] 6 | Description=Mount 9P on /media/%I 7 | DefaultDependencies=no 8 | Wants=addon-run@media-%i.service addon-config@media-%i.service 9 | Before=addon-run@media-%i.service addon-config@media-%i.service 10 | Wants=media.mount 11 | After=media.mount 12 | Conflicts=umount.target 13 | ConditionPathIsMountPoint=!/media/%I 14 | 15 | [Service] 16 | Type=oneshot 17 | RemainAfterExit=no 18 | ExecStartPre=/bin/mkdir -p /media/%I 19 | ExecStart=/bin/mount -t 9p -o trans=virtio,version=9p2000.L %I /media/%I 20 | -------------------------------------------------------------------------------- /crates/systemd-parser/tests/success_units/xenserver-pv-version.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Set fake PV driver version for XenServer 3 | DefaultDependencies=false 4 | Requires=proc-xen.mount 5 | After=proc-xen.mount 6 | IgnoreOnIsolate=true 7 | ConditionVirtualization=xen 8 | 9 | [Service] 10 | Type=oneshot 11 | RemainAfterExit=true 12 | # Only attempt the write if 'attr' exists, it may not. 13 | ExecStart=/bin/sh -c \ 14 | 'if xenstore exists attr; then xenstore write \ 15 | attr/PVAddons/MajorVersion 6 \ 16 | attr/PVAddons/MinorVersion 2 \ 17 | attr/PVAddons/MicroVersion 0 \ 18 | data/updated 1; fi' 19 | --------------------------------------------------------------------------------