[SCM] debian-live/live-initramfs branch, master, updated. 1.110.4-1-5-g6bae95f
Daniel Baumann
daniel at debian.org
Sat Nov 10 15:22:52 UTC 2007
The branch, master has been updated
via 6bae95f6d381b751e8dbe7a73c2c97482519e554 (commit)
via 9a68b02bdc9fdbfbfef9c751650a21c4f33b36a4 (commit)
from d6fcb73b6fe12c8b461e830a790325cd5f69adee (commit)
- Shortlog ------------------------------------------------------------
6bae95f Fixing some coding style issues.
9a68b02 Adding files to the live filesystem according to the MAC number, thanks to Jordi Pujol <jordi_pujol at telefonica.net>.
Summary of changes:
scripts/live | 27 +++++++++++++++++++++++----
scripts/live-helpers | 24 ++++++++++++++----------
2 files changed, 37 insertions(+), 14 deletions(-)
-----------------------------------------------------------------------
Details of changes:
commit 6bae95f6d381b751e8dbe7a73c2c97482519e554
Author: Daniel Baumann <daniel at debian.org>
Date: Sat Nov 10 16:22:23 2007 +0100
Fixing some coding style issues.
diff --git a/scripts/live b/scripts/live
index 5867209..9fff065 100755
--- a/scripts/live
+++ b/scripts/live
@@ -507,7 +507,7 @@ mount_images_in_directory ()
{
directory="${1}"
rootmnt="${2}"
- mac="$3"
+ mac="${3}"
if match_files_in_dir "${directory}/${LIVE_MEDIA_PATH}/*.squashfs" ||
@@ -515,7 +515,7 @@ mount_images_in_directory ()
match_files_in_dir "${directory}/${LIVE_MEDIA_PATH}/*.ext3" ||
match_files_in_dir "${directory}/${LIVE_MEDIA_PATH}/*.dir"
then
- [ -n "$mac" ] && adddirectory="$directory/${LIVE_MEDIA_PATH}/${mac}"
+ [ -n "${mac}" ] && adddirectory="${directory}/${LIVE_MEDIA_PATH}/${mac}"
setup_unionfs "${directory}/${LIVE_MEDIA_PATH}" "${rootmnt}" "${adddirectory}"
else
:
@@ -872,7 +872,7 @@ setup_unionfs ()
{
image_directory="${1}"
rootmnt="${2}"
- addimage_directory="$3"
+ addimage_directory="${3}"
modprobe -q -b ${UNIONTYPE}
# run-init can't deal with images in a subdir, but we're going to
@@ -921,18 +921,19 @@ setup_unionfs ()
done
done
- if [ -n "${addimage_directory}" -a -d "${addimage_directory}" ]; then
- for FILESYSTEM in squashfs ext2 ext3 xfs dir
- do
- for IMAGE in "${addimage_directory}"/*."${FILESYSTEM}"
- do
- if [ -e "${IMAGE}" ]
- then
- image_string="${image_string} ${IMAGE}"
- fi
- done
- done
- fi
+ if [ -n "${addimage_directory}" ] && [ -d "${addimage_directory}" ]
+ then
+ for FILESYSTEM in squashfs ext2 ext3 xfs dir
+ do
+ for IMAGE in "${addimage_directory}"/*."${FILESYSTEM}"
+ do
+ if [ -e "${IMAGE}" ]
+ then
+ image_string="${image_string} ${IMAGE}"
+ fi
+ done
+ done
+ fi
# Now sort the list
image_string="$(echo ${image_string} | sed -e 's/ /\n/g' | sort )"
@@ -994,7 +995,7 @@ setup_unionfs ()
nfs_cow_opts="-o nolock"
nfs_cow=${NFS_COW}
fi
- mac=$(get_mac)
+ mac="$(get_mac)"
if [ -n "${mac}" ]
then
cowdevice=$(echo ${nfs_cow}|sed "s/client_mac_address/${mac}/")
@@ -1278,8 +1279,8 @@ mountroot ()
then
setup_unionfs "${livefs_root}" "${rootmnt}"
else
- mac=$(get_mac)
- mac=$(echo ${mac}|sed "s/-//g")
+ mac="$(get_mac)"
+ mac="$(echo ${mac} | sed 's/-//g')"
mount_images_in_directory "${livefs_root}" "${rootmnt}" "${mac}"
fi
diff --git a/scripts/live-helpers b/scripts/live-helpers
index f49eaf7..5e1730b 100644
--- a/scripts/live-helpers
+++ b/scripts/live-helpers
@@ -291,14 +291,18 @@ find_files ()
get_mac ()
{
- mac=""
- for adaptor in /sys/class/net/*;do
- status=$(cat ${adaptor}/iflink)
- if [ ${status} -eq 2 ];
- then
- mac=$(cat ${adaptor}/address)
- mac=$(echo ${mac}|sed 's/:/-/g'|tr '[a-z]' '[A-Z]')
- fi
- done
- echo $mac
+ mac=""
+
+ for adaptor in /sys/class/net/*
+ do
+ status="$(cat ${adaptor}/iflink)"
+
+ if [ "${status}" -eq 2 ]
+ then
+ mac="$(cat ${adaptor}/address)"
+ mac="$(echo ${mac} | sed 's/:/-/g' | tr '[a-z]' '[A-Z]')"
+ fi
+ done
+
+ echo ${mac}
}
commit 9a68b02bdc9fdbfbfef9c751650a21c4f33b36a4
Author: Daniel Baumann <daniel at debian.org>
Date: Sat Nov 10 16:18:18 2007 +0100
Adding files to the live filesystem according to the MAC number, thanks to Jordi Pujol <jordi_pujol at telefonica.net>.
diff --git a/scripts/live b/scripts/live
index 1dcbc74..5867209 100755
--- a/scripts/live
+++ b/scripts/live
@@ -507,13 +507,16 @@ mount_images_in_directory ()
{
directory="${1}"
rootmnt="${2}"
+ mac="$3"
+
if match_files_in_dir "${directory}/${LIVE_MEDIA_PATH}/*.squashfs" ||
match_files_in_dir "${directory}/${LIVE_MEDIA_PATH}/*.ext2" ||
match_files_in_dir "${directory}/${LIVE_MEDIA_PATH}/*.ext3" ||
match_files_in_dir "${directory}/${LIVE_MEDIA_PATH}/*.dir"
then
- setup_unionfs "${directory}/${LIVE_MEDIA_PATH}" "${rootmnt}"
+ [ -n "$mac" ] && adddirectory="$directory/${LIVE_MEDIA_PATH}/${mac}"
+ setup_unionfs "${directory}/${LIVE_MEDIA_PATH}" "${rootmnt}" "${adddirectory}"
else
:
fi
@@ -869,7 +872,7 @@ setup_unionfs ()
{
image_directory="${1}"
rootmnt="${2}"
-
+ addimage_directory="$3"
modprobe -q -b ${UNIONTYPE}
# run-init can't deal with images in a subdir, but we're going to
@@ -918,6 +921,19 @@ setup_unionfs ()
done
done
+ if [ -n "${addimage_directory}" -a -d "${addimage_directory}" ]; then
+ for FILESYSTEM in squashfs ext2 ext3 xfs dir
+ do
+ for IMAGE in "${addimage_directory}"/*."${FILESYSTEM}"
+ do
+ if [ -e "${IMAGE}" ]
+ then
+ image_string="${image_string} ${IMAGE}"
+ fi
+ done
+ done
+ fi
+
# Now sort the list
image_string="$(echo ${image_string} | sed -e 's/ /\n/g' | sort )"
fi
@@ -1262,7 +1278,9 @@ mountroot ()
then
setup_unionfs "${livefs_root}" "${rootmnt}"
else
- mount_images_in_directory "${livefs_root}" "${rootmnt}"
+ mac=$(get_mac)
+ mac=$(echo ${mac}|sed "s/-//g")
+ mount_images_in_directory "${livefs_root}" "${rootmnt}" "${mac}"
fi
log_end_msg
--
debian-live/live-initramfs
More information about the debian-live-changes
mailing list