Adding debian version 3.0~a1-1.
[live-boot-grml.git] / scripts / live
index 11ad984..a17eb42 100755 (executable)
@@ -639,6 +639,22 @@ do_netsetup ()
                HWADDR="$(cat /sys/class/net/${DEVICE}/address)"
        fi
 
+       if [ ! -e "/etc/resolv.conf" ]
+       then
+               echo "Creating /etc/resolv.conf"
+
+               if [ -n "${DNSDOMAIN}" ]
+               then
+                       echo "domain ${DNSDOMAIN}" > /etc/resolv.conf
+                       echo "search ${DNSDOMAIN}" > /etc/resolv.conf
+               fi
+
+               for i in ${IPV4DNS0} ${IPV4DNS1} ${IPV4DNS1}
+               do
+                       echo "nameserver $i" >> /etc/resolv.conf
+               done
+       fi
+
        # Check if we have a network device at all
        if ! ls /sys/class/net/"$DEVICE" > /dev/null 2>&1 && \
           ! ls /sys/class/net/eth0 > /dev/null 2>&1 && \
@@ -785,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"
@@ -816,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}
@@ -1595,6 +1608,7 @@ find_livefs ()
                                fi
                        done
                elif [ "${fstype}" = "squashfs" -o \
+                       "${fstype}" = "btrfs" -o \
                        "${fstype}" = "ext2" -o \
                        "${fstype}" = "ext3" -o \
                        "${fstype}" = "ext4" -o \
@@ -1778,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