~ubuntu-branches/debian/experimental/sysvinit/experimental

« back to all changes in this revision

Viewing changes to debian/initscripts.postinst

  • Committer: Package Import Robot
  • Author(s): Roger Leigh, Roger Leigh, Steve Langasek
  • Date: 2012-04-21 12:11:45 UTC
  • mfrom: (9.1.33 sid)
  • Revision ID: package-import@ubuntu.com-20120421121145-tcyy57v1j6gx946d
Tags: 2.88dsf-23
[ Roger Leigh ]
* Acknowledge NMU for translation updates.  Thanks to Christian
  Perrier.
* debian/control:
  - Upgrade to Standards-Version 3.9.3.
  - Build-Depend on debhelper v9.
  - Correct Vcs-Git URL.
* debian/rules:
  - Use DEB_HOST_ARCH_OS = hurd rather than
    DEB_HOST_ARCH = hurd-i386.   Thanks to Pino Toscano.
* debian/patches:
  - 11_lfs_cflags.patch: Add patch for enabling large file support,
    needed on GNU/Hurd, but useful for all platforms.
  - 73_lfs_cflags.patch: Add patch for enabling large file support
    in startpar.
* initscripts:
  - Moved RAM* settings from /etc/default/rcS to /etc/default/tmpfs.
    This ensures that the settings are equivalent for upgrades and
    new installations, but will require manual configuration of the
    settings for upgrades (no migration from /etc/default/rcS to
    /etc/default/tmpfs will take place, due to tmpfs being a
    conffile).  tmpf(5) manual page added to document all aspects
    of tmpfs configuration, including the existing documentation in
    rcS(5).
  - Drop the use of .ramfs dotfiles in /run and /run/lock.  These
    were a legacy of /lib/init/rw and were not actually used by
    anything.  Closes: #403863.
  - Drop /etc/init.d/mountoverflowtmp.  This has been merged into
    the general tmpfs on /tmp handling functions.  This means the
    generic RAMTMP configuration is used for the overflowtmp.
    Closes: #567539.
  - It is now possible to configure a tmpfs mount size limit as a
    percentage of the total VM size (%VM) as well as a percentage
    of the RAM size (%).  This is computed by tmpfs.sh and the
    tmpfs mounts are remounted with the updated size limit after
    swap becomes available.
  - An fstab entry for /tmp overrides RAMTMP.  Document tmpfs
    override and tmpfs defaults in tmpfs(5), also undeprecating the
    tmpfs settings.  Closes: #585540, #665995.
  - An fstab entry for /run/lock or /run/shm overrides RAMLOCK and
    RAMSHM.
  - bootclean cleans /tmp, /run and /run/lock before any filesystems
    are mounted as well as after local and network mounts.  This
    permits cleaning of directories which would otherwise be hidden
    by mountpoints later in the boot process.
    Closes: #55707, #558000, #666871.  Additionally clean up
    /lib/init/rw in case any files were hidden by the (now removed)
    tmpfs mount at this location.  Closes: #652625.
  - Removed last trace of the long-removed EDITMOTD from the
    postinst.  Closes: #438895.
  - Removed documentation of #346342 in rcS(5).  This is no longer
    an issue now tzdata keeps a copy of the data on the rootfs.
    Closes: #385172.
  - Correct description of TMPTIME in rcS(5).  Thanks to Alan J.
    Greenberger.  Closes: #562500.
  - urandom: Applied a series of patches from John Denker to
    improve the integrity of random number generation.  Many thanks.
    Closes: #596479, #596480, #596481, #596482, #596483.
* sysv-rc:
  - Remove old upgrade logic from maintainer scripts not required
    for wheezy.
  - Migrate users of obsolete static boot ordering to dynamic boot
    ordering.
  - Remove use of /etc/init.d/.legacy-bootordering.  Closes: #668312.
  - Improve help text of debconf message when it is not possible to
    automatically enable dynamic boot ordering.  Provide explicit
    instructions for how to purge obsolete init scripts.
    Closes: #550425.
  - etc/init.d/rc: Ensure linprocfs is mounted on kFreeBSD.  Thanks
    to Robert Millan.  Closes: #659480.
  - Drop undocumented CONCURRENCY setting from /etc/init.d/rc.
    Closes: #518249, #540448, #539261.  Note that this still contains
    internal fallbacks to support non-insserv booting, which may be
    removed at a later date.
  - invoke-rc.d:
    + Minor manual page corrections.  Thanks to Anthony Fiumara.
      Closes: #664816.
    + Remove mention of the "dpkg Programmers' Manual" and replace
      with references to Debian Policy.  Closes: #543793.
  - update-rc.d:
    + Correctly warn about non-LSB standard runlevels.  Thanks to
      Chris Hiestand for this patch.  Closes: #614895.
    + Remove obsolete documentation of
      /var/lib/sysv-rc/legacy-bootsequence.  Thanks to Thomas Hood.
      Closes: #623051.
* sysvinit:
  - Minor corrections for halt(8) manual page.  Thanks to
    Christoph Anton Mitterer.  Closes: #587923.
  - Installation with debootstrap --variant=fakechroot now works, due
    to only migrating the old control channel when it is still
    present.  Thanks to Michael Gilbert.  Closes: #596284.
* sysvinit-utils:
  - Recommend bootlogd.  Closes: #659490.  This means that booklogd
    will be installed by default, but will be removable.
    Closes: #232569.
  - Correct documentation of the startpar -i option.  Closes: #545438.
  - Correct startpar(8) SEE ALSO section.  Closes: #634146.
  - Correct wording in service(8).  Thanks to Joey Hess and Regid
    Ichira.  Closes: #545401, #667745.

[ Steve Langasek ]
* debian/service/service: fix upstart compatibility to not try to use the
  upstart commands when init isn't upstart.  Closes: #636054.
* debian/rules: pass CFLAGS when building startpar.
* Fix startpar to not run init scripts that have matching upstart jobs,
  instead waiting for a signal from upstart.  Closes: #660824.
    to Robert Millan.  (Closes: #659480)
* sysvinit:
  - Don't restart or perform initctl migration if systemd is
    running.

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
        return 0
88
88
}
89
89
 
90
 
# Migrate settings from /etc/default/tmpfs to fstab.  This is to allow
91
 
# sharing of settings between sysvinit initscripts and systemd.  It is
92
 
# a one time only migration.  /etc/default/tmpfs will be removed for
93
 
# wheezy, and this migration function should be removed in wheezy+1.
94
 
# Creation of an fstab entry is only done if the size limits do not
95
 
# match the defaults, i.e. have been locally modified.
96
 
tmpfs_fstab_migrate () {
97
 
    if [ -n "$RUN_SIZE" ] && [ "$RUN_SIZE" != "10%" ]; then
98
 
        RUNEXEC=
99
 
        if read_fstab_entry /run/shm || [ yes = "$RAMSHM" ] ; then
100
 
            RUNEXEC=',noexec'
101
 
        fi
102
 
        # TODO: Add -onodev once checkroot no longer creates a device node.
103
 
        domount fstab tmpfs shmfs /run tmpfs "-onosuid$RUNEXEC$RUN_OPT" 2>&1 >>/etc/fstab
104
 
    fi
105
 
    if [ yes = "$RAMLOCK" ] && [ -n "$LOCK_SIZE" ] && [ "$LOCK_SIZE" != "5242880" ]; then
106
 
        # Locally modified.
107
 
        domount fstab tmpfs shmfs /run/lock tmpfs "-onodev,noexec,nosuid$LOCK_OPT" 2>&1 >>/etc/fstab
108
 
    fi
109
 
    if [ yes = "$RAMSHM" ] && [ -n "$SHM_SIZE" ] && [ "$SHM_SIZE" != "20%" ]; then
110
 
        # Locally modified.
111
 
        domount fstab tmpfs shmfs /run/shm tmpfs "-onosuid,nodev$SHM_OPT" 2>&1 >>/etc/fstab
112
 
    fi
113
 
}
114
 
 
115
90
#
116
91
# Initialize rcS default file.
117
92
#
151
126
if dpkg --compare-versions "$PREV_VER" lt "2.87dsf-2" ; then
152
127
        update-rc.d -f mountoverflowtmp remove >/dev/null
153
128
fi
 
129
# In 2.88dsf-23 the "mountoverflowtmp" script was dropped entirely.
 
130
if dpkg --compare-versions "$PREV_VER" lt "2.88dsf-23" ; then
 
131
        update-rc.d -f mountoverflowtmp remove >/dev/null
 
132
fi
 
133
 
 
134
# Comment out obsolete options in rcS.
 
135
if dpkg --compare-versions "$PREV_VER" lt "2.88dsf-23" ; then
 
136
    if [ -f /etc/default/rcS ]; then
 
137
        sed -i -e 's:^\(RAM.*=.*\)$:#\1 # OBSOLETE; see /etc/default/tmpfs and tmpfs(5).:' -e 's:^\(EDITMOTD=.*\)$:#\1 # OBSOLETE.:' /etc/default/rcS
 
138
    fi
 
139
fi
154
140
 
155
141
#
156
142
# Okay, we could do this with update-rc.d, but that would probably
162
148
update-rc.d mountkernfs.sh         start 02 S . >/dev/null || exit $?
163
149
update-rc.d hostname.sh            start 02 S . >/dev/null || exit $?
164
150
update-rc.d mountdevsubfs.sh       start 04 S . >/dev/null || exit $?
165
 
update-rc.d bootlogd               start 05 S . >/dev/null || exit $?
166
151
update-rc.d checkroot.sh           start 10 S . >/dev/null || exit $?
167
152
update-rc.d mtab.sh                start 12 S . >/dev/null || exit $?
 
153
update-rc.d checkroot-bootclean.sh start 13 S . >/dev/null || exit $?
168
154
update-rc.d checkfs.sh             start 30 S . >/dev/null || exit $?
169
155
update-rc.d mountall.sh            start 35 S . >/dev/null || exit $?
170
156
update-rc.d mountall-bootclean.sh  start 36 S . >/dev/null || exit $?
171
 
update-rc.d mountoverflowtmp       start 37 S . >/dev/null || exit $?
172
157
update-rc.d mountnfs.sh            start 45 S . >/dev/null || exit $?
173
158
update-rc.d mountnfs-bootclean.sh  start 46 S . >/dev/null || exit $?
174
159
update-rc.d bootmisc.sh            start 55 S . >/dev/null || exit $?
188
173
update-rc.d bootlogs               start 70 1 2 3 4 5 . >/dev/null || exit $?
189
174
update-rc.d rc.local               start 99 2 3 4 5 . >/dev/null || exit $?
190
175
update-rc.d rmnologin              start 99 2 3 4 5 . >/dev/null || exit $?
191
 
update-rc.d stop-bootlogd-single   start 99 S . >/dev/null || exit $?
192
 
update-rc.d stop-bootlogd          start 99 2 3 4 5 . >/dev/null || exit $?
193
176
 
194
177
#
195
178
# Remove scripts that were left behind by older glibc (<< 2.3.2.ds1-12)
249
232
# Ensure presence of /run/sendsigs.omit.d
250
233
[ -d /run/sendsigs.omit.d ] || { mkdir --mode=755 /run/sendsigs.omit.d ; chown root:root /run/sendsigs.omit.d || [ "$FAKECHROOT" = true ]; }
251
234
 
252
 
tmpfs_fstab_migrate
253
 
 
254
235
# In wheezy+1, remove /lib/init/rw
255
236
#if dpkg --compare-versions "$PREV_VER" le "2.88dsf-14" \
256
237
# && [ -d /lib/init/rw ]; then
316
297
fi
317
298
if [ ! -L /etc/motd ]
318
299
then
319
 
        [ -f /etc/default/rcS ] && . /etc/default/rcS
320
 
        if [ "$EDITMOTD" = no ]
321
 
        then
322
 
                cat /var/run/motd > /etc/motd.static
323
 
                ln -sf motd.static /etc/motd
324
 
        else
325
 
                ln -sf /var/run/motd /etc/motd
326
 
        fi
 
300
        ln -sf /var/run/motd /etc/motd
327
301
fi
328
302
 
329
303
#