aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/etc/hostname1
-rwxr-xr-xcommon/etc/sysconfig/network-scripts/ifcfg-eth016
-rwxr-xr-xcreate_arm_img_urpmi.sh27
3 files changed, 32 insertions, 12 deletions
diff --git a/common/etc/hostname b/common/etc/hostname
new file mode 100644
index 0000000..8d1c8b6
--- /dev/null
+++ b/common/etc/hostname
@@ -0,0 +1 @@
+
diff --git a/common/etc/sysconfig/network-scripts/ifcfg-eth0 b/common/etc/sysconfig/network-scripts/ifcfg-eth0
new file mode 100755
index 0000000..d6bf1a6
--- /dev/null
+++ b/common/etc/sysconfig/network-scripts/ifcfg-eth0
@@ -0,0 +1,16 @@
+DEVICE=eth0
+BOOTPROTO=dhcp
+ONBOOT=yes
+METRIC=10
+MII_NOT_SUPPORTED=no
+USERCTL=yes
+RESOLV_MODS=no
+IPV6INIT=no
+IPV6TO4INIT=no
+ACCOUNTING=no
+NM_CONTROLLED=no
+DHCP_CLIENT=dhclient
+NEEDHOSTNAME=no
+PEERDNS=yes
+PEERYP=yes
+PEERNTPD=no
diff --git a/create_arm_img_urpmi.sh b/create_arm_img_urpmi.sh
index 03ab716..18680c5 100755
--- a/create_arm_img_urpmi.sh
+++ b/create_arm_img_urpmi.sh
@@ -409,39 +409,35 @@ EOF
info "device $DEVICE"
info "partitions list:"
info "$(/sbin/partx -v "$INSTALL_PATH/$IMAGE")"
+ BOOTP="${DEVICE}p1"
+ ROOTP="${DEVICE}p2"
}
formatpartitions()
{
info "Formatting partitions"
- info "boot as $1"
+ info "Boot : $BOOTP as $1"
"/sbin/mkfs.$1" "$BOOTP"
if [ $? -ne 0 ];then
error "line $LINENO error formating $BOOTP : exiting"
/sbin/losetup -d "$DEVICE"
exit 1
fi
- info "root as $2"
+ info "Root : $ROOTP as $2"
"/sbin/mkfs.$2" "$ROOTP"
if [ $? -ne 0 ];then
error "line $LINENO error formating $ROOTP : exiting"
/sbin/losetup -d "$DEVICE"
exit 1
fi
- BOOTP="${DEVICE}p1"
- BOOT_UUID=$(blkid -o value uuid "$BOOTP" | head -n 1)
+ BOOT_UUID=$(blkid -s UUID -o value UUID "$BOOTP")
info "Boot UUID: $BOOT_UUID"
- ROOTP="${DEVICE}p2"
- ROOT_UUID=$(blkid -o value uuid "$ROOTP" | head -n 1)
+ ROOT_UUID=$(blkid -s UUID -o value UUID "$ROOTP")
info "Root UUID: $ROOT_UUID"
}
copyingsystem()
{
- #getting UUID of root partition
- #ROOT_ID=`/sbin/blkid -s UUID -o value "${DEVICE}p2"`
- #info "blkid -s UUID -o value ${DEVICE}p2"
- #info "root partition ID: $ROOT_ID"
info "mounting partitions, creating mountpoint if necessary"
if ! [ -d "$BOOT" ];then
/bin/mkdir "$BOOT"
@@ -468,7 +464,7 @@ copyingsystem()
exit 1
fi
- info "copying Mageia image to root parition"
+ info "copying Mageia image to root partition"
/bin/rsync -a --exclude boot/ --exclude "qemu-arm-static*" "$BUILD_PATH/" "$ROOT/"
/bin/rsync -a "$BUILD_PATH/boot/" "$BOOT/"
@@ -516,7 +512,7 @@ brcmfmac" >> "$BUILD_PATH"/etc/modules
xu3-4)
;;
esac
-
+ copyingcommon
/usr/bin/sync
/usr/bin/umount "$BOOT" "$ROOT"
if [ $? -eq 0 ];then
@@ -534,6 +530,13 @@ brcmfmac" >> "$BUILD_PATH"/etc/modules
warning "You can now burn the image ( $IMAGE ) on SD card"
}
+# Copying files common to all systems
+copyingcommon()
+{
+ rsync -aP "$SOURCE_PATH/common/" "$ROOT/"
+
+}
+
if [ $# == 0 ];then
help
exit