- First commit of directory common
This commit is contained in:
parent
49d9c6c5cd
commit
89849e1353
1
common/etc/hostname
Normal file
1
common/etc/hostname
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
16
common/etc/sysconfig/network-scripts/ifcfg-eth0
Executable file
16
common/etc/sysconfig/network-scripts/ifcfg-eth0
Executable file
@ -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
|
@ -409,39 +409,35 @@ EOF
|
|||||||
info "device $DEVICE"
|
info "device $DEVICE"
|
||||||
info "partitions list:"
|
info "partitions list:"
|
||||||
info "$(/sbin/partx -v "$INSTALL_PATH/$IMAGE")"
|
info "$(/sbin/partx -v "$INSTALL_PATH/$IMAGE")"
|
||||||
|
BOOTP="${DEVICE}p1"
|
||||||
|
ROOTP="${DEVICE}p2"
|
||||||
}
|
}
|
||||||
|
|
||||||
formatpartitions()
|
formatpartitions()
|
||||||
{
|
{
|
||||||
info "Formatting partitions"
|
info "Formatting partitions"
|
||||||
info "boot as $1"
|
info "Boot : $BOOTP as $1"
|
||||||
"/sbin/mkfs.$1" "$BOOTP"
|
"/sbin/mkfs.$1" "$BOOTP"
|
||||||
if [ $? -ne 0 ];then
|
if [ $? -ne 0 ];then
|
||||||
error "line $LINENO error formating $BOOTP : exiting"
|
error "line $LINENO error formating $BOOTP : exiting"
|
||||||
/sbin/losetup -d "$DEVICE"
|
/sbin/losetup -d "$DEVICE"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
info "root as $2"
|
info "Root : $ROOTP as $2"
|
||||||
"/sbin/mkfs.$2" "$ROOTP"
|
"/sbin/mkfs.$2" "$ROOTP"
|
||||||
if [ $? -ne 0 ];then
|
if [ $? -ne 0 ];then
|
||||||
error "line $LINENO error formating $ROOTP : exiting"
|
error "line $LINENO error formating $ROOTP : exiting"
|
||||||
/sbin/losetup -d "$DEVICE"
|
/sbin/losetup -d "$DEVICE"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
BOOTP="${DEVICE}p1"
|
BOOT_UUID=$(blkid -s UUID -o value UUID "$BOOTP")
|
||||||
BOOT_UUID=$(blkid -o value uuid "$BOOTP" | head -n 1)
|
|
||||||
info "Boot UUID: $BOOT_UUID"
|
info "Boot UUID: $BOOT_UUID"
|
||||||
ROOTP="${DEVICE}p2"
|
ROOT_UUID=$(blkid -s UUID -o value UUID "$ROOTP")
|
||||||
ROOT_UUID=$(blkid -o value uuid "$ROOTP" | head -n 1)
|
|
||||||
info "Root UUID: $ROOT_UUID"
|
info "Root UUID: $ROOT_UUID"
|
||||||
}
|
}
|
||||||
|
|
||||||
copyingsystem()
|
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"
|
info "mounting partitions, creating mountpoint if necessary"
|
||||||
if ! [ -d "$BOOT" ];then
|
if ! [ -d "$BOOT" ];then
|
||||||
/bin/mkdir "$BOOT"
|
/bin/mkdir "$BOOT"
|
||||||
@ -468,7 +464,7 @@ copyingsystem()
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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 --exclude boot/ --exclude "qemu-arm-static*" "$BUILD_PATH/" "$ROOT/"
|
||||||
/bin/rsync -a "$BUILD_PATH/boot/" "$BOOT/"
|
/bin/rsync -a "$BUILD_PATH/boot/" "$BOOT/"
|
||||||
|
|
||||||
@ -516,7 +512,7 @@ brcmfmac" >> "$BUILD_PATH"/etc/modules
|
|||||||
xu3-4)
|
xu3-4)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
copyingcommon
|
||||||
/usr/bin/sync
|
/usr/bin/sync
|
||||||
/usr/bin/umount "$BOOT" "$ROOT"
|
/usr/bin/umount "$BOOT" "$ROOT"
|
||||||
if [ $? -eq 0 ];then
|
if [ $? -eq 0 ];then
|
||||||
@ -534,6 +530,13 @@ brcmfmac" >> "$BUILD_PATH"/etc/modules
|
|||||||
warning "You can now burn the image ( $IMAGE ) on SD card"
|
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
|
if [ $# == 0 ];then
|
||||||
help
|
help
|
||||||
exit
|
exit
|
||||||
|
Reference in New Issue
Block a user