/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: 2019-02-11 05:15:24 UTC
  • Revision ID: teddy@recompile.se-20190211051524-yxvuh6xj86ag3xqk
Fix Debian watch file

* debian/watch: Make the ".orig" suffix non-optional; otherwise uscan
  thinks that ".orig" is part of the version number.

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";
282
284
  }
283
285
  /* Try the old pid file location */
284
286
  if(proc_id == 0){
285
 
    pidfile = fopen(plymouth_pid, "r");
 
287
    pidfile = fopen(plymouth_old_pid, "r");
 
288
    if(pidfile != NULL){
 
289
      ret = fscanf(pidfile, "%" SCNuMAX, &proc_id);
 
290
      if(ret != 1){
 
291
        proc_id = 0;
 
292
      }
 
293
      fclose(pidfile);
 
294
    }
 
295
  }
 
296
  /* Try the old old pid file location */
 
297
  if(proc_id == 0){
 
298
    pidfile = fopen(plymouth_old_old_pid, "r");
286
299
    if(pidfile != NULL){
287
300
      ret = fscanf(pidfile, "%" SCNuMAX, &proc_id);
288
301
      if(ret != 1){