~ubuntu-branches/debian/stretch/lvm2/stretch

« back to all changes in this revision

Viewing changes to scripts/lvm2_activation_generator_systemd_red_hat.c

  • Committer: Package Import Robot
  • Author(s): Bastian Blank
  • Date: 2014-08-19 15:37:06 UTC
  • mfrom: (30.1.11 sid)
  • Revision ID: package-import@ubuntu.com-20140819153706-0p2sc6a53ef7xnvl
Tags: 2.02.109-1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
170
170
{
171
171
        const char *dir;
172
172
        int r = EXIT_SUCCESS;
 
173
        mode_t old_mask;
173
174
 
174
175
        kmsg_fd = open(KMSG_DEV_PATH, O_WRONLY|O_NOCTTY);
175
176
 
184
185
 
185
186
        dir = argv[1];
186
187
 
 
188
        /* mark lvm2-activation.*.service as world-accessible */
 
189
        old_mask = umask(0022);
187
190
        if (!generate_unit(dir, UNIT_EARLY) ||
188
191
            !generate_unit(dir, UNIT_MAIN) ||
189
192
            !generate_unit(dir, UNIT_NET))
190
193
                r = EXIT_FAILURE;
 
194
        umask(old_mask);
191
195
out:
192
196
        if (r)
193
197
                kmsg(LOG_ERR, "LVM: Activation generator failed.\n");