On Fri, May 13, 2011 at 05:29:23PM +0100, Roger Leigh wrote: > On Wed, Apr 27, 2011 at 05:20:13PM +0100, Roger Leigh wrote: > > On Sat, Apr 23, 2011 at 10:07:28AM +1000, Kel Modderman wrote: > > > On Sat, 23 Apr 2011 04:27:00 AM Roger Leigh wrote: > > > > Hi Kel and other sysvinit developers, > > > > > > > > I've attached a further update for your consideration, which fixes a > > > > few issues. If it's OK with you, this could be uploaded to > > > > experimental (with your changes folded into the same version in the > > > > changelog) as 2.88dsf-13.5. Unless you'd prefer to do a maintainer > > > > upload. > > > > > > > > The logic used for mounting filesystems is duplicated entirely between > > > > the various scripts doing mounting, and the mtab script used to > > > > generate the initial mtab. This includes the domtab() function, which > > > > is almost entirely identical to domount() with the use of -f with mount. > > > > This patch removes the duplication, and uses the same codepaths for > > > > both mounting and mtab generation, which will make the scripts much > > > > more robust when making any changes. > > > > > > Great improvement. > > > > [...] > > > > > In my opnion: do not hesitate to upload this to experimental and continue > > > the > > > improvement of the transition to /run. > > > > I've uploaded sysvinit_2.88dsf-13.5 to experimental. The patch against > > SVN is attached. This only differs from the previous patch by one > > character (s/50%/20%/ for a size limit check). > > I've attached a diff against current svn for sysvinit_2.88dsf-13.6. > > This is quite a small patch > - reverts relative symlinks back to absolute to comply with debian > policy > - fixes a typo and placement of return in mount-functions.sh > - remounts filesystems only after mtab becomes writable > > If it's OK with you, I would like to upload this to unstable now > that initramfs-tools_0.99 went in today, which was a prequisite for > full udev support.
I've attached an updated copy; it's identical to the first, but with a couple of bug Closes: added. Regards, Roger -- .''`. Roger Leigh : :' : Debian GNU/Linux http://people.debian.org/~rleigh/ `. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/ `- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
diff --git a/debian/changelog b/debian/changelog index 45bcd8e..15dd00d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,18 @@ +sysvinit (2.88dsf-13.6) unstable; urgency=low + + [ Roger Leigh ] + * Non-maintainer upload. + * Don't remount filesystems mounted in the initramfs until mtab + exists. Use the existing reload functionality of mountkernfs + an mountdevsubfs to allow mtab.sh to trigger the remounts. + (Closes: #623174) + * Revert to using absolute paths in compatibility symlinks in order + to comply with Policy ยง10.5 symlink rules. (Closes: #626263) + * The permissions of /tmp are only set when root is writable. + (Closes: #623934) + + -- Roger Leigh <[email protected]> Sat, 14 May 2011 00:30:52 +0100 + sysvinit (2.88dsf-13.5) experimental; urgency=low [ Roger Leigh ] diff --git a/debian/initscripts.postinst b/debian/initscripts.postinst index db2a7ee..6775290 100755 --- a/debian/initscripts.postinst +++ b/debian/initscripts.postinst @@ -244,14 +244,14 @@ done if guest_environment; then # Symlink /var/run from /run # Note var/run is relative - if compat_link var/run /run; then + if compat_link /var/run /run; then # Symlink /var/lock from /run/lock # Note that it's really /var/run/lock - compat_link ../../var/lock /run/lock + compat_link /var/lock /run/lock # Symlink /dev/shm from /run/shm # Note that it's really /var/run/shm - compat_link ../../dev/shm /run/shm + compat_link /dev/shm /run/shm fi # Host system, not a chroot. else diff --git a/debian/src/initscripts/etc/init.d/mtab.sh b/debian/src/initscripts/etc/init.d/mtab.sh index 18c9bc7..65ad2d2 100644 --- a/debian/src/initscripts/etc/init.d/mtab.sh +++ b/debian/src/initscripts/etc/init.d/mtab.sh @@ -77,10 +77,12 @@ do_start () { # Add entries for mounts created in early boot # S01mountkernfs.sh /etc/init.d/mountkernfs.sh mtab + /etc/init.d/mountkernfs.sh reload # S03udev domount mtab tmpfs "" /dev "udev" "-omode=0755" # S03mountdevsubfs.sh /etc/init.d/mountdevsubfs.sh mtab + /etc/init.d/mountdevsubfs.sh reload # Add everything else in /proc/mounts into /etc/mtab, with # special exceptions. diff --git a/debian/src/initscripts/lib/init/mount-functions.sh b/debian/src/initscripts/lib/init/mount-functions.sh index 1100990..666a5d3 100644 --- a/debian/src/initscripts/lib/init/mount-functions.sh +++ b/debian/src/initscripts/lib/init/mount-functions.sh @@ -87,11 +87,9 @@ read_fstab_entry () { found=1 if [ -f /etc/fstab ]; then - exec 9<&0 </etc/fstab - - while read MNT_FSNAME MNT_DIR MNT_TYPE MNT_OPTS MNT_FREQ MAN_PASS MAN_JUNK + while read MNT_FSNAME MNT_DIR MNT_TYPE MNT_OPTS MNT_FREQ MNT_PASS MNT_JUNK do case "$MNT_FSNAME" in ""|\#*) @@ -109,9 +107,9 @@ read_fstab_entry () { done exec 0<&9 9<&- - - return $found fi + + return $found } # Mount kernel and device file systems. @@ -210,8 +208,8 @@ domount () { if mountpoint -q "$MTPT"; then # Already mounted, probably moved from the # initramfs, so remount with the - # user-specified mount options. - mount $MOUNTFLAGS -oremount $CALLER_OPTS $FSTAB_OPTS $MTPT + # user-specified mount options later on. + : else if [ "$VERBOSE" != "no" ]; then is_empty_dir "$MTPT" >/dev/null 2>&1 || log_warning_msg "Files under mount point '$MTPT' will be hidden." @@ -279,7 +277,6 @@ run_migrate () { OLD=$1 RUN=$2 - RUNLINK=$3 KERNEL="$(uname -s)" OPTS="" @@ -290,11 +287,13 @@ run_migrate () *) FSTYPE=none ;; esac - # Create relative symlink if not already present. This is to - # upgrade from older versions which created absolute links. - if [ -L "$OLD" ] && [ "$(readlink "$OLD")" = "$RUN" ]; then + # Create absolute symlink if not already present. This is to + # upgrade from older versions which created relative links, + # which are not permitted in policy between top-level + # directories. + if [ -L "$OLD" ] && [ "$(readlink "$OLD")" != "$RUN" ]; then rm -f "$OLD" - ln -fs "$RUNLINK" "$OLD" + ln -fs "$RUN" "$OLD" fi # If both directories are the same, we don't need to do @@ -323,11 +322,11 @@ run_migrate () mount -t $FSTYPE "$RUN" "$OLD" $OPTS else # Create symlink if not already present. - if [ -L "$OLD" ] && [ "$(readlink "$OLD")" = "$RUNLINK" ]; then + if [ -L "$OLD" ] && [ "$(readlink "$OLD")" != "$RUN" ]; then : else rm -f "$OLD" - ln -fs "$RUNLINK" "$OLD" + ln -fs "$RUN" "$OLD" fi fi @@ -351,7 +350,7 @@ post_mountall () # filesystems are mounted, we replace the directory with a # symlink where possible. - run_migrate /var/run /run ../run - run_migrate /var/lock /run/lock ../run/lock - run_migrate /dev/shm /run/shm ../run/shm + run_migrate /var/run /run + run_migrate /var/lock /run/lock + run_migrate /dev/shm /run/shm }
signature.asc
Description: Digital signature
_______________________________________________ Pkg-sysvinit-devel mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/pkg-sysvinit-devel

