~ubuntu-branches/debian/stretch/screen/stretch

« back to all changes in this revision

Viewing changes to debian/postinst

  • Committer: Package Import Robot
  • Author(s): Axel Beckert
  • Date: 2015-06-17 21:57:18 UTC
  • mfrom: (7.1.5 experimental)
  • Revision ID: package-import@ubuntu.com-20150617215718-mmj4dpghyl5a0ipy
Tags: 4.3.0-2
* Upload to unstable again.
* Re-add debian/dirs with /etc/tmpfiles.d/ and add a comment why screen
  ships an empty directory.
  + Fixes regression introduced in 4.2.1-4: If systemd is not installed
    and screen is either setuid or neither setuid nor setgid,
    /var/lib/dpkg/info/screen.postinst bailed out with "16:
    /var/lib/dpkg/info/screen.postinst: cannot create
    /etc/tmpfiles.d/screen-cleanup.conf: Directory nonexistent".
  + See comment in debian/dirs for more detailed reasoning.
* No more ship /lib/systemd/system/screen-cleanup.service in the package
  but link it to /dev/null in postinst and remove the link again in
  postrm. (LP: #1462692)
* Add fixed bugs reported in Ubuntu to previous changelog entry.
* Apply wrap-and-sort.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
  override=/etc/tmpfiles.d/screen-cleanup.conf
12
12
  if [ $perms -eq 4755 ]; then
13
13
    chmod 0755 /var/run/screen
14
 
    [ -f $override ] || echo 'd /var/run/screen 0755 root utmp' > $override
 
14
    if [ ! -f $override ]; then
 
15
       echo 'd /var/run/screen 0755 root utmp' > $override
 
16
    fi
15
17
  elif [ $perms -eq 755 ]; then
16
18
    chmod 1777 /var/run/screen
17
 
    [ -f $override ] || echo 'd /var/run/screen 1777 root utmp' > $override
18
 
  fi
 
19
    if [ ! -f $override ]; then
 
20
       echo 'd /var/run/screen 1777 root utmp' > $override
 
21
    fi
 
22
  fi
 
23
 
 
24
  # LP #1462692
 
25
  servicedir=/lib/systemd/system
 
26
  servicefile=$servicedir/screen-cleanup.service
 
27
  mkdir -p $servicedir
 
28
  if [ ! -e $servicefile ]; then
 
29
      ln -s /dev/null $servicefile
 
30
  fi
 
31
 
19
32
  add-shell /usr/bin/screen || true
20
33
fi
21
34