Fix omitpids to work with readonly images.
authorMichal Suchanek <hramrach@centrum.cz>
Tue, 27 Jul 2010 10:05:26 +0000 (12:05 +0200)
committerDaniel Baumann <daniel@debian.org>
Tue, 27 Jul 2010 14:21:52 +0000 (16:21 +0200)
debian/live-boot.init
scripts/live

index 71ae122..12d0f94 100644 (file)
@@ -203,8 +203,8 @@ case "${1}" in
                ;;
        start)
                log_begin_msg "${NAME} is configuring sendsigs..."
-               if [ -f /live/image/root.pid ] ; then
-                       cat /live/image/root.pid >> /var/run/sendsigs.omit
+               if [ -f /live/root.pid ] ; then
+                       cat /live/root.pid >> /var/run/sendsigs.omit
                fi
                log_end_msg 0
                ;;
index 295b75f..a17eb42 100755 (executable)
@@ -801,7 +801,7 @@ do_httpmount ()
                                                fi
                                                modprobe fuse
                                                $FUSE_MOUNT "${url}" "${dest}"
-                                               FUSE_PID="$(minips h -C "$FUSE_MOUNT" | { read x y ; echo "$x" ; } )"
+                                               ROOT_PID="$(minips h -C "$FUSE_MOUNT" | { read x y ; echo "$x" ; } )"
                                        fi
                                        [ ${?} -eq 0 ] && rc=0
                                        [ "${extension}" = "tgz" ] && live_dest="ram"
@@ -832,9 +832,6 @@ do_httpmount ()
        elif [ "${webfile}"  != "FETCH" ] ; then
                NETBOOT="${webfile}"
                export NETBOOT
-               if [ -n "${FUSE_PID}" ] ; then
-                       echo "${FUSE_PID}" > ${mountpoint}/root.pid
-               fi
        fi
 
        return ${rc}
@@ -1795,6 +1792,11 @@ mountroot ()
                mount_images_in_directory "${livefs_root}" "${rootmnt}" "${mac}"
        fi
 
+
+       if [ -n "${ROOT_PID}" ] ; then
+               echo "${ROOT_PID}" > "${rootmnt}"/live/root.pid
+       fi
+
        log_end_msg
 
        # unionfs-fuse needs /dev to be bind-mounted for the duration of