| Brad Bishop | e36358c | 2016-06-08 22:03:59 -0400 | [diff] [blame] | 1 | # Common code for systemd based services. | 
|  | 2 | # | 
|  | 3 | # Prior to inheriting this class, recipes can define services like this: | 
|  | 4 | # | 
|  | 5 | # SYSTEMD_SERVICE_${PN} = "foo.service bar.socket baz@.service" | 
|  | 6 | # | 
|  | 7 | # and these files will be added to the main package if they exist. | 
|  | 8 | # | 
|  | 9 | # Alternatively this class can just be inherited and | 
| Brad Bishop | 62d676a | 2016-07-11 00:42:58 -0400 | [diff] [blame] | 10 | # ${PN}.service will be added to the main package. | 
| Brad Bishop | 687146f | 2016-07-11 13:05:26 -0400 | [diff] [blame] | 11 | # | 
|  | 12 | # Other variables: | 
|  | 13 | # INHIBIT_SYSTEMD_RESTART_POLICY_${unit} | 
|  | 14 | #    Inhibit the warning that is displayed if a service unit without a | 
|  | 15 | #    restart policy is detected. | 
| Brad Bishop | 51528fe | 2016-07-14 19:34:06 -0400 | [diff] [blame] | 16 | # | 
| Brad Bishop | 5e329ba | 2016-08-17 12:08:16 -0400 | [diff] [blame] | 17 | # SYSTEMD_SUBSTITUTIONS_${path-relative-to-system_unitdir} | 
|  | 18 | #    Variables in this list will be substituted in the specified | 
| Brad Bishop | 51528fe | 2016-07-14 19:34:06 -0400 | [diff] [blame] | 19 | #    file during install (if bitbake finds python {format} strings | 
| Brad Bishop | 5e329ba | 2016-08-17 12:08:16 -0400 | [diff] [blame] | 20 | #    in the file itself).  List entries take the form: | 
| Brad Bishop | 51528fe | 2016-07-14 19:34:06 -0400 | [diff] [blame] | 21 | #      VAR:VALUE | 
|  | 22 | #    where {VAR} is the format string bitbake should look for in the | 
| Brad Bishop | 5e329ba | 2016-08-17 12:08:16 -0400 | [diff] [blame] | 23 | #    file and VALUE is the value to substitute. | 
| Brad Bishop | f815b2e | 2016-07-14 19:50:19 -0400 | [diff] [blame] | 24 | # | 
| Brad Bishop | 58700d1 | 2016-08-15 22:35:58 -0400 | [diff] [blame] | 25 | # SYSTEMD_USER_${PN}.service = "foo" | 
|  | 26 | # SYSTEMD_USER_${unit}.service = "foo" | 
|  | 27 | #    The user for the unit/package. | 
| Brad Bishop | afb2e1b | 2016-08-08 09:29:20 -0400 | [diff] [blame] | 28 | # | 
|  | 29 | # SYSTEMD_ENVIRONMENT_FILE_${PN} = "foo" | 
|  | 30 | #    One or more environment files to be installed. | 
| Brad Bishop | 0161aff | 2016-08-17 14:46:41 -0400 | [diff] [blame] | 31 | # | 
|  | 32 | # SYSTEMD_LINK_${PN} = "tgt:name" | 
|  | 33 | #    A specification for installing arbitrary links in | 
|  | 34 | #    the ${systemd_system_unitdir} namespace, where: | 
|  | 35 | #      tgt: the link target | 
|  | 36 | #      name: the link name, relative to ${systemd_system_unitdir} | 
| Brad Bishop | 51528fe | 2016-07-14 19:34:06 -0400 | [diff] [blame] | 37 |  | 
| Brad Bishop | 9dc5671 | 2016-07-07 15:56:02 -0400 | [diff] [blame] | 38 |  | 
|  | 39 | inherit obmc-phosphor-utils | 
| Brad Bishop | 93fb535 | 2015-09-09 03:59:20 +0000 | [diff] [blame] | 40 | inherit systemd | 
| Brad Bishop | f815b2e | 2016-07-14 19:50:19 -0400 | [diff] [blame] | 41 | inherit useradd | 
| Brad Bishop | 93fb535 | 2015-09-09 03:59:20 +0000 | [diff] [blame] | 42 |  | 
| Brad Bishop | 9dc5671 | 2016-07-07 15:56:02 -0400 | [diff] [blame] | 43 | _INSTALL_SD_UNITS="" | 
| Brad Bishop | 51528fe | 2016-07-14 19:34:06 -0400 | [diff] [blame] | 44 | SYSTEMD_DEFAULT_TARGET ?= "obmc-standby.target" | 
| Brad Bishop | afb2e1b | 2016-08-08 09:29:20 -0400 | [diff] [blame] | 45 | envfiledir ?= "${sysconfdir}/default" | 
| Brad Bishop | 9dc5671 | 2016-07-07 15:56:02 -0400 | [diff] [blame] | 46 |  | 
| Brad Bishop | f815b2e | 2016-07-14 19:50:19 -0400 | [diff] [blame] | 47 | # Big ugly hack to prevent useradd.bbclass post-parse sanity checker failure. | 
|  | 48 | # If there are users to be added, we'll add them in our post-parse. | 
|  | 49 | # If not...there don't seem to be any ill effects... | 
|  | 50 | USERADD_PACKAGES ?= " " | 
|  | 51 | USERADD_PARAM_${PN} ?= ";" | 
|  | 52 |  | 
| Brad Bishop | e36358c | 2016-06-08 22:03:59 -0400 | [diff] [blame] | 53 |  | 
| Brad Bishop | 1864529 | 2016-08-16 08:18:07 -0400 | [diff] [blame] | 54 | def SystemdUnit(unit): | 
|  | 55 | class Unit(object): | 
|  | 56 | def __init__(self, unit): | 
|  | 57 | self.unit = unit | 
| Brad Bishop | 687146f | 2016-07-11 13:05:26 -0400 | [diff] [blame] | 58 |  | 
| Brad Bishop | 1864529 | 2016-08-16 08:18:07 -0400 | [diff] [blame] | 59 | def __getattr__(self, item): | 
|  | 60 | if item is 'name': | 
|  | 61 | return self.unit | 
|  | 62 | if item is 'is_activated': | 
|  | 63 | return self.unit.startswith('dbus-') | 
|  | 64 | if item is 'is_template': | 
|  | 65 | return '@.' in self.unit | 
|  | 66 | if item is 'is_instance': | 
|  | 67 | return '@' in self.unit and not self.is_template | 
|  | 68 | if item in ['is_service', 'is_target']: | 
|  | 69 | return self.unit.split('.')[-1] == item | 
|  | 70 | if item is 'base': | 
|  | 71 | cls = self.unit.split('.')[-1] | 
|  | 72 | base = self.unit.replace('dbus-', '') | 
|  | 73 | base = base.replace('.%s' % cls, '') | 
|  | 74 | if self.is_instance: | 
|  | 75 | base = base.rstrip('@%s' % self.instance) | 
|  | 76 | if self.is_template: | 
|  | 77 | base = base.rstrip('@') | 
|  | 78 | return base | 
|  | 79 | if item is 'instance' and self.is_instance: | 
|  | 80 | inst = self.unit.rsplit('@')[-1] | 
|  | 81 | return inst.rsplit('.')[0] | 
|  | 82 | if item is 'template' and self.is_instance: | 
|  | 83 | cls = self.unit.split('.')[-1] | 
|  | 84 | return '%s@.%s' % (self.base, cls) | 
|  | 85 | if item is 'template' and self.is_template: | 
|  | 86 | return '.'.join(self.base.split('@')[:-1]) | 
| Brad Bishop | 687146f | 2016-07-11 13:05:26 -0400 | [diff] [blame] | 87 |  | 
| Brad Bishop | 1864529 | 2016-08-16 08:18:07 -0400 | [diff] [blame] | 88 | raise AttributeError(item) | 
|  | 89 | return Unit(unit) | 
| Brad Bishop | 687146f | 2016-07-11 13:05:26 -0400 | [diff] [blame] | 90 |  | 
|  | 91 |  | 
|  | 92 | def systemd_parse_unit(d, path): | 
|  | 93 | import ConfigParser | 
|  | 94 | parser = ConfigParser.SafeConfigParser() | 
|  | 95 | parser.optionxform = str | 
|  | 96 | parser.read('%s' % path) | 
|  | 97 | return parser | 
|  | 98 |  | 
|  | 99 |  | 
| Brad Bishop | e36358c | 2016-06-08 22:03:59 -0400 | [diff] [blame] | 100 | python() { | 
| Brad Bishop | 687146f | 2016-07-11 13:05:26 -0400 | [diff] [blame] | 101 | def check_sd_unit(d, unit): | 
| Brad Bishop | 9dc5671 | 2016-07-07 15:56:02 -0400 | [diff] [blame] | 102 | searchpaths = d.getVar('FILESPATH', True) | 
| Brad Bishop | 1864529 | 2016-08-16 08:18:07 -0400 | [diff] [blame] | 103 | path = bb.utils.which(searchpaths, '%s' % unit.name) | 
| Brad Bishop | 9dc5671 | 2016-07-07 15:56:02 -0400 | [diff] [blame] | 104 | if not os.path.isfile(path): | 
| Brad Bishop | 1864529 | 2016-08-16 08:18:07 -0400 | [diff] [blame] | 105 | bb.fatal('Did not find unit file "%s"' % unit.name) | 
| Brad Bishop | 687146f | 2016-07-11 13:05:26 -0400 | [diff] [blame] | 106 |  | 
|  | 107 | parser = systemd_parse_unit(d, path) | 
|  | 108 | inhibit = listvar_to_list(d, 'INHIBIT_SYSTEMD_RESTART_POLICY_WARNING') | 
| Brad Bishop | 1864529 | 2016-08-16 08:18:07 -0400 | [diff] [blame] | 109 | if unit.is_service and \ | 
|  | 110 | not unit.is_template and \ | 
|  | 111 | unit.name not in inhibit and \ | 
| Brad Bishop | 687146f | 2016-07-11 13:05:26 -0400 | [diff] [blame] | 112 | not parser.has_option('Service', 'Restart'): | 
|  | 113 | bb.warn('Systemd unit \'%s\' does not ' | 
| Brad Bishop | 1864529 | 2016-08-16 08:18:07 -0400 | [diff] [blame] | 114 | 'have a restart policy defined.' % unit.name) | 
| Brad Bishop | 687146f | 2016-07-11 13:05:26 -0400 | [diff] [blame] | 115 |  | 
|  | 116 |  | 
| Brad Bishop | 522234c | 2016-08-17 15:42:31 -0400 | [diff] [blame] | 117 | def add_default_subs(d, file): | 
|  | 118 | set_append(d, '_MAKE_SUBS', '%s' % file) | 
| Brad Bishop | 687146f | 2016-07-11 13:05:26 -0400 | [diff] [blame] | 119 |  | 
| Brad Bishop | 51528fe | 2016-07-14 19:34:06 -0400 | [diff] [blame] | 120 | for x in [ | 
|  | 121 | 'base_bindir', | 
|  | 122 | 'bindir', | 
|  | 123 | 'sbindir', | 
| Brad Bishop | afb2e1b | 2016-08-08 09:29:20 -0400 | [diff] [blame] | 124 | 'envfiledir', | 
| Brad Bishop | 51528fe | 2016-07-14 19:34:06 -0400 | [diff] [blame] | 125 | 'SYSTEMD_DEFAULT_TARGET' ]: | 
| Brad Bishop | 522234c | 2016-08-17 15:42:31 -0400 | [diff] [blame] | 126 | set_append(d, 'SYSTEMD_SUBSTITUTIONS_%s' % file, | 
| Brad Bishop | 51528fe | 2016-07-14 19:34:06 -0400 | [diff] [blame] | 127 | '%s:%s' % (x, d.getVar(x, True))) | 
|  | 128 |  | 
| Brad Bishop | f815b2e | 2016-07-14 19:50:19 -0400 | [diff] [blame] | 129 |  | 
| Brad Bishop | 522234c | 2016-08-17 15:42:31 -0400 | [diff] [blame] | 130 | def add_sd_unit(d, unit, pkg): | 
| Brad Bishop | 1864529 | 2016-08-16 08:18:07 -0400 | [diff] [blame] | 131 | name = unit.name | 
| Brad Bishop | 522234c | 2016-08-17 15:42:31 -0400 | [diff] [blame] | 132 | unit_dir = d.getVar('systemd_system_unitdir', True) | 
|  | 133 | set_append(d, 'SRC_URI', 'file://%s' % name) | 
|  | 134 | set_append(d, 'FILES_%s' % pkg, '%s/%s' % (unit_dir, name)) | 
|  | 135 | set_append(d, '_INSTALL_SD_UNITS', name) | 
|  | 136 | add_default_subs(d, name) | 
|  | 137 |  | 
|  | 138 |  | 
|  | 139 | def add_sd_user(d, file, pkg): | 
| Brad Bishop | f815b2e | 2016-07-14 19:50:19 -0400 | [diff] [blame] | 140 | opts = [ | 
|  | 141 | '--system', | 
|  | 142 | '--home', | 
|  | 143 | '/', | 
|  | 144 | '--no-create-home', | 
|  | 145 | '--shell /sbin/nologin', | 
|  | 146 | '--user-group'] | 
|  | 147 |  | 
| Brad Bishop | 522234c | 2016-08-17 15:42:31 -0400 | [diff] [blame] | 148 | var = 'SYSTEMD_USER_%s' % file | 
| Brad Bishop | 58700d1 | 2016-08-15 22:35:58 -0400 | [diff] [blame] | 149 | user = listvar_to_list(d, var) | 
|  | 150 | if len(user) is 0: | 
|  | 151 | var = 'SYSTEMD_USER_%s' % pkg | 
|  | 152 | user = listvar_to_list(d, var) | 
|  | 153 | if len(user) is not 0: | 
|  | 154 | if len(user) is not 1: | 
|  | 155 | bb.fatal('Too many users assigned to %s: \'%s\'' % (var, ' '.join(user))) | 
|  | 156 |  | 
|  | 157 | user = user[0] | 
| Brad Bishop | 522234c | 2016-08-17 15:42:31 -0400 | [diff] [blame] | 158 | set_append(d, 'SYSTEMD_SUBSTITUTIONS_%s' % file, | 
| Brad Bishop | 58700d1 | 2016-08-15 22:35:58 -0400 | [diff] [blame] | 159 | 'USER:%s' % user) | 
|  | 160 | if user not in d.getVar('USERADD_PARAM_%s' % pkg, True): | 
|  | 161 | set_append( | 
|  | 162 | d, | 
|  | 163 | 'USERADD_PARAM_%s' % pkg, | 
|  | 164 | '%s' % (' '.join(opts + [user])), | 
|  | 165 | ';') | 
| Brad Bishop | f815b2e | 2016-07-14 19:50:19 -0400 | [diff] [blame] | 166 | if pkg not in d.getVar('USERADD_PACKAGES', True): | 
|  | 167 | set_append(d, 'USERADD_PACKAGES', pkg) | 
|  | 168 |  | 
| Brad Bishop | 9dc5671 | 2016-07-07 15:56:02 -0400 | [diff] [blame] | 169 |  | 
| Brad Bishop | afb2e1b | 2016-08-08 09:29:20 -0400 | [diff] [blame] | 170 | def add_env_file(d, name, pkg): | 
|  | 171 | set_append(d, 'SRC_URI', 'file://%s' % name) | 
|  | 172 | set_append(d, 'FILES_%s' % pkg, '%s/%s' \ | 
|  | 173 | % (d.getVar('envfiledir', True), name)) | 
|  | 174 | set_append(d, '_INSTALL_ENV_FILES', name) | 
|  | 175 |  | 
|  | 176 |  | 
| Brad Bishop | 0161aff | 2016-08-17 14:46:41 -0400 | [diff] [blame] | 177 | def install_link(d, spec, pkg): | 
|  | 178 | tgt, dest = spec.split(':') | 
|  | 179 |  | 
|  | 180 | set_append(d, 'FILES_%s' % pkg, '%s/%s' \ | 
|  | 181 | % (d.getVar('systemd_system_unitdir', True), dest)) | 
|  | 182 | set_append(d, '_INSTALL_LINKS', spec) | 
|  | 183 |  | 
|  | 184 |  | 
| Brad Bishop | 62d676a | 2016-07-11 00:42:58 -0400 | [diff] [blame] | 185 | pn = d.getVar('PN', True) | 
| Brad Bishop | 9dc5671 | 2016-07-07 15:56:02 -0400 | [diff] [blame] | 186 | if d.getVar('SYSTEMD_SERVICE_%s' % pn, True) is None: | 
|  | 187 | d.setVar('SYSTEMD_SERVICE_%s' % pn, '%s.service' % pn) | 
| Brad Bishop | e36358c | 2016-06-08 22:03:59 -0400 | [diff] [blame] | 188 |  | 
| Brad Bishop | 9dc5671 | 2016-07-07 15:56:02 -0400 | [diff] [blame] | 189 | for pkg in listvar_to_list(d, 'SYSTEMD_PACKAGES'): | 
| Brad Bishop | 1864529 | 2016-08-16 08:18:07 -0400 | [diff] [blame] | 190 | svc = listvar_to_list(d, 'SYSTEMD_SERVICE_%s' % pkg) | 
|  | 191 | svc = [SystemdUnit(x) for x in svc] | 
|  | 192 | tmpl = [x.template for x in svc if x.is_instance] | 
|  | 193 | tmpl = list(set(tmpl)) | 
|  | 194 | tmpl = [SystemdUnit(x) for x in tmpl] | 
|  | 195 | svc = [x for x in svc if not x.is_instance] | 
|  | 196 |  | 
|  | 197 | for unit in tmpl + svc: | 
| Brad Bishop | 687146f | 2016-07-11 13:05:26 -0400 | [diff] [blame] | 198 | check_sd_unit(d, unit) | 
| Brad Bishop | 9dc5671 | 2016-07-07 15:56:02 -0400 | [diff] [blame] | 199 | add_sd_unit(d, unit, pkg) | 
| Brad Bishop | 522234c | 2016-08-17 15:42:31 -0400 | [diff] [blame] | 200 | add_sd_user(d, unit.name, pkg) | 
| Brad Bishop | afb2e1b | 2016-08-08 09:29:20 -0400 | [diff] [blame] | 201 | for name in listvar_to_list(d, 'SYSTEMD_ENVIRONMENT_FILE_%s' % pkg): | 
|  | 202 | add_env_file(d, name, pkg) | 
| Brad Bishop | 0161aff | 2016-08-17 14:46:41 -0400 | [diff] [blame] | 203 | for spec in listvar_to_list(d, 'SYSTEMD_LINK_%s' % pkg): | 
|  | 204 | install_link(d, spec, pkg) | 
| Brad Bishop | e36358c | 2016-06-08 22:03:59 -0400 | [diff] [blame] | 205 | } | 
| Brad Bishop | 93fb535 | 2015-09-09 03:59:20 +0000 | [diff] [blame] | 206 |  | 
| Brad Bishop | 9dc5671 | 2016-07-07 15:56:02 -0400 | [diff] [blame] | 207 |  | 
| Brad Bishop | 51528fe | 2016-07-14 19:34:06 -0400 | [diff] [blame] | 208 | python systemd_do_postinst() { | 
| Brad Bishop | 522234c | 2016-08-17 15:42:31 -0400 | [diff] [blame] | 209 | def make_subs(d): | 
|  | 210 | for f in listvar_to_list(d, '_MAKE_SUBS'): | 
|  | 211 | subs = dict([ x.split(':') for x in | 
|  | 212 | listvar_to_list(d, 'SYSTEMD_SUBSTITUTIONS_%s' % f)]) | 
|  | 213 | if not subs: | 
|  | 214 | continue | 
| Brad Bishop | 51528fe | 2016-07-14 19:34:06 -0400 | [diff] [blame] | 215 |  | 
| Brad Bishop | 522234c | 2016-08-17 15:42:31 -0400 | [diff] [blame] | 216 | path = d.getVar('D', True) | 
|  | 217 | path += d.getVar('systemd_system_unitdir', True) | 
|  | 218 | path += '/%s' % f | 
|  | 219 | with open(path, 'r') as fd: | 
|  | 220 | content = fd.read() | 
|  | 221 | with open(path, 'w+') as fd: | 
|  | 222 | try: | 
|  | 223 | fd.write(content.format(**subs)) | 
|  | 224 | except KeyError as e: | 
|  | 225 | bb.fatal('No substitution found for %s in ' | 
|  | 226 | 'file \'%s\'' % (e, f)) | 
|  | 227 |  | 
|  | 228 |  | 
| Brad Bishop | afb2e1b | 2016-08-08 09:29:20 -0400 | [diff] [blame] | 229 | def install_envs(d): | 
|  | 230 | install_dir = d.getVar('D', True) | 
|  | 231 | install_dir += d.getVar('envfiledir', True) | 
|  | 232 | searchpaths = d.getVar('FILESPATH', True) | 
|  | 233 |  | 
|  | 234 | for f in listvar_to_list(d, '_INSTALL_ENV_FILES'): | 
|  | 235 | src = bb.utils.which(searchpaths, f) | 
|  | 236 | if not os.path.isfile(src): | 
|  | 237 | bb.fatal('Did not find SYSTEMD_ENVIRONMENT_FILE:' | 
|  | 238 | '\'%s\'' % src) | 
|  | 239 |  | 
|  | 240 | dest = os.path.join(install_dir, f) | 
|  | 241 | parent = os.path.dirname(dest) | 
|  | 242 | if not os.path.exists(parent): | 
|  | 243 | os.makedirs(parent) | 
|  | 244 |  | 
|  | 245 | with open(src, 'r') as fd: | 
|  | 246 | content = fd.read() | 
|  | 247 | with open(dest, 'w+') as fd: | 
|  | 248 | fd.write(content) | 
|  | 249 |  | 
|  | 250 |  | 
| Brad Bishop | 0161aff | 2016-08-17 14:46:41 -0400 | [diff] [blame] | 251 | def install_links(d): | 
|  | 252 | install_dir = d.getVar('D', True) | 
|  | 253 | install_dir += d.getVar('systemd_system_unitdir', True) | 
|  | 254 |  | 
|  | 255 | for spec in listvar_to_list(d, '_INSTALL_LINKS'): | 
|  | 256 | tgt, dest = spec.split(':') | 
|  | 257 | dest = os.path.join(install_dir, dest) | 
|  | 258 | parent = os.path.dirname(dest) | 
|  | 259 | if not os.path.exists(parent): | 
|  | 260 | os.makedirs(parent) | 
|  | 261 | os.symlink(tgt, dest) | 
|  | 262 |  | 
|  | 263 |  | 
|  | 264 | install_links(d) | 
| Brad Bishop | afb2e1b | 2016-08-08 09:29:20 -0400 | [diff] [blame] | 265 | install_envs(d) | 
| Brad Bishop | 522234c | 2016-08-17 15:42:31 -0400 | [diff] [blame] | 266 | make_subs(d) | 
| Brad Bishop | 51528fe | 2016-07-14 19:34:06 -0400 | [diff] [blame] | 267 | } | 
|  | 268 |  | 
|  | 269 |  | 
| Brad Bishop | 93fb535 | 2015-09-09 03:59:20 +0000 | [diff] [blame] | 270 | do_install_append() { | 
| Brad Bishop | e36358c | 2016-06-08 22:03:59 -0400 | [diff] [blame] | 271 | # install systemd service/socket/template files | 
| Brad Bishop | 9dc5671 | 2016-07-07 15:56:02 -0400 | [diff] [blame] | 272 | [ -z "${_INSTALL_SD_UNITS}" ] || \ | 
| Brad Bishop | e36358c | 2016-06-08 22:03:59 -0400 | [diff] [blame] | 273 | install -d ${D}${systemd_system_unitdir} | 
| Brad Bishop | 9dc5671 | 2016-07-07 15:56:02 -0400 | [diff] [blame] | 274 | for s in ${_INSTALL_SD_UNITS}; do | 
|  | 275 | install -m 0644 ${WORKDIR}/$s \ | 
|  | 276 | ${D}${systemd_system_unitdir}/$s | 
| Brad Bishop | e36358c | 2016-06-08 22:03:59 -0400 | [diff] [blame] | 277 | sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ | 
|  | 278 | -e 's,@BINDIR@,${bindir},g' \ | 
|  | 279 | -e 's,@SBINDIR@,${sbindir},g' \ | 
|  | 280 | ${D}${systemd_system_unitdir}/$s | 
|  | 281 | done | 
| Brad Bishop | 93fb535 | 2015-09-09 03:59:20 +0000 | [diff] [blame] | 282 | } | 
| Brad Bishop | 51528fe | 2016-07-14 19:34:06 -0400 | [diff] [blame] | 283 |  | 
|  | 284 |  | 
|  | 285 | do_install[postfuncs] += "systemd_do_postinst" |