"systemctl status foo.service" ought to have an error message that the unit file is broken. However, comments in ExecStart= are just passed on verbatim to whatever you execute, so this should reflect in some specific error message? I. e. if I have
$ cat /etc/systemd/system/broken.service [Service] ExecStart=/bin/sleep 1 # muhaha $ sudo systemctl daemon-reload $ sudo systemctl start broken.service $ systemctl status broken.service ● broken.service Loaded: loaded (/etc/systemd/system/broken.service; static; vendor preset: enabled) Active: failed (Result: exit-code) since Di 2015-06-02 12:39:05 CEST; 7s ago Process: 12139 ExecStart=/bin/sleep 1 # muhaha (code=exited, status=1/FAILURE) Main PID: 12139 (code=exited, status=1/FAILURE) Jun 02 12:39:05 donald systemd[1]: Started broken.service. Jun 02 12:39:05 donald systemd[1]: Starting broken.service... Jun 02 12:39:05 donald sleep[12139]: /bin/sleep: ungültiges Zeitintervall »#“ Jun 02 12:39:05 donald systemd[1]: broken.service: main process exited, code=exited, status=1/FAILURE Jun 02 12:39:05 donald sleep[12139]: /bin/sleep: ungültiges Zeitintervall »muhaha“ Jun 02 12:39:05 donald sleep[12139]: „/bin/sleep --help“ liefert weitere Informationen. Jun 02 12:39:05 donald systemd[1]: Unit broken.service entered failed state. Jun 02 12:39:05 donald systemd[1]: broken.service failed. which seems quite clear? (Sorry for the German error messages, they basically say "invalid time interval") -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1448656 Title: systemd doesn't allow proper shutdown after it encountered errornous .service Status in systemd package in Ubuntu: Invalid Bug description: Assume you have created a `.service` unit file in `/lib/systemd/system/` with a syntax error and reboot. At system start the start of the unit fails, but then the system/`systemd` no longer responds to <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>Del</kbd> and the system needs to be killed by pulling the plug. That can corrupt the system because services which on shutdown hook, like a write-back cache which needs to write data back to disks before the machine is turned of, aren't executed. It'd be better if the errornous service/unit would be skipped, a rescue shell provided or at least a possibility to shutdown properly given. ProblemType: Bug DistroRelease: Ubuntu 15.04 Package: systemd 219-7ubuntu3 Uname: Linux 4.0.0-040000-generic x86_64 ApportVersion: 2.17.2-0ubuntu1 Architecture: amd64 Date: Sun Apr 26 13:06:54 2015 EcryptfsInUse: Yes InstallationDate: Installed on 2015-04-20 (5 days ago) InstallationMedia: Ubuntu-Server 14.10 "Utopic Unicorn" - Release amd64 (20141022.2) MachineType: To Be Filled By O.E.M. To Be Filled By O.E.M. ProcEnviron: TERM=xterm PATH=(custom, no user) XDG_RUNTIME_DIR=<set> LANG=de_DE.UTF-8 SHELL=/bin/bash ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.0.0-040000-generic root=/dev/mapper/root-root ro rootflags=subvol=@ nomdmonddf nomdmonisw nomdmonddf nomdmonisw SourcePackage: systemd UpgradeStatus: Upgraded to vivid on 2015-04-24 (1 days ago) dmi.bios.date: 08/21/2014 dmi.bios.vendor: American Megatrends Inc. dmi.bios.version: P1.20 dmi.board.name: X99 Extreme3 dmi.board.vendor: ASRock dmi.chassis.asset.tag: To Be Filled By O.E.M. dmi.chassis.type: 3 dmi.chassis.vendor: To Be Filled By O.E.M. dmi.chassis.version: To Be Filled By O.E.M. dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrP1.20:bd08/21/2014:svnToBeFilledByO.E.M.:pnToBeFilledByO.E.M.:pvrToBeFilledByO.E.M.:rvnASRock:rnX99Extreme3:rvr:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.: dmi.product.name: To Be Filled By O.E.M. dmi.product.version: To Be Filled By O.E.M. dmi.sys.vendor: To Be Filled By O.E.M. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1448656/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : [email protected] Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp

