/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to plugins.d/plymouth.c

  • Committer: Teddy Hogeborn
  • Date: 2018-08-19 14:32:00 UTC
  • Revision ID: teddy@recompile.se-20180819143200-8j8sc2hv4ovjqo11
Remove workaround for old mkinitramfs-kpkg

* Makefile (install-client-nokey): Do not install
  "initramfs-tools-hook-conf".
* debian/control (mandos-client/Depends): Add "(>= 0.99)" to
  dependency on "initramfs-tools", since that is the version which
  removed mkinitramfs-kpkg.
* debian/mandos-client.dirs: Remove
  "usr/share/initramfs-tools/conf-hooks.d".
* initramfs-tools-hook-conf: Removed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
/*
3
3
 * Plymouth - Read a password from Plymouth and output it
4
4
 * 
5
 
 * Copyright © 2010-2017 Teddy Hogeborn
6
 
 * Copyright © 2010-2017 Björn Påhlsson
 
5
 * Copyright © 2010-2018 Teddy Hogeborn
 
6
 * Copyright © 2010-2018 Björn Påhlsson
7
7
 * 
8
8
 * This file is part of Mandos.
9
9
 * 
57
57
sig_atomic_t interrupted_by_signal = 0;
58
58
 
59
59
/* Used by Ubuntu 11.04 (Natty Narwahl) */
60
 
const char plymouth_old_pid[] = "/dev/.initramfs/plymouth.pid";
 
60
const char plymouth_old_old_pid[] = "/dev/.initramfs/plymouth.pid";
61
61
/* Used by Ubuntu 11.10 (Oneiric Ocelot) */
62
 
const char plymouth_pid[] = "/run/initramfs/plymouth.pid";
 
62
const char plymouth_old_pid[] = "/run/initramfs/plymouth.pid";
 
63
/* Used by Debian 9 (stretch) */
 
64
const char plymouth_pid[] = "/run/plymouth/pid";
63
65
 
64
66
const char plymouth_path[] = "/bin/plymouth";
65
67
const char plymouthd_path[] = "/sbin/plymouthd";
291
293
      fclose(pidfile);
292
294
    }
293
295
  }
 
296
  /* Try the old old pid file location */
 
297
  if(proc_id == 0){
 
298
    pidfile = fopen(plymouth_old_old_pid, "r");
 
299
    if(pidfile != NULL){
 
300
      ret = fscanf(pidfile, "%" SCNuMAX, &proc_id);
 
301
      if(ret != 1){
 
302
        proc_id = 0;
 
303
      }
 
304
      fclose(pidfile);
 
305
    }
 
306
  }
294
307
  /* Look for a plymouth process */
295
308
  if(proc_id == 0){
296
309
    struct dirent **direntries = NULL;