config_swraid_setup()
{
TMPFILE=$(mktemp)
-RAIDLEVEL=$(dialog --stdout --title "$PN" --default-item raid1 \
- --menu "Which RAID level do you want to use?" 0 0 0 \
- raid1 "Software RAID level 1" \
- raid5 "Software RAID level 5")
-[ $? -eq 0 ] || bailout 20
+
+# Currently we support only raid1:
+RAIDLEVEL='raid1'
+
+#RAIDLEVEL=$(dialog --stdout --title "$PN" --default-item raid1 \
+# --menu "Which RAID level do you want to use?" 0 0 0 \
+# raid1 "Software RAID level 1" \
+# raid5 "Software RAID level 5")
+#[ $? -eq 0 ] || bailout 20
MD_LIST=$(for i in $(seq 0 9) ; do
awk '{print $4}' /proc/partitions | grep -q md$i || \
if dialog --stdout --title "$PN" \
--defaultno --yesno "Do you want to configure Software RAID?
-Please notice that currently only RAID levels 1 and 5 are supported by ${PN}. Configuration will take place using mdadm." 0 0 ; then
+Please notice that only RAID level 1 is supported by ${PN} currently. Configuration will take place using mdadm." 0 0 ; then
config_swraid_setup
fi
}
# make sure we have our files for later use via chroot-script
cp /etc/debootstrap/config $MNTPOINT/etc/debootstrap/
# make sure we adjust the configuration variables accordingly:
- sed -i "s/RELEASE=.*/RELEASE=\"$RELEASE\"/" $MNTPOINT/etc/debootstrap/config
- sed -i "s/TARGET=.*/TARGET=\"$TARGET\"/" $MNTPOINT/etc/debootstrap/config
- sed -i "s/GRUB=.*/GRUB=\"$GRUB\"/" $MNTPOINT/etc/debootstrap/config
- sed -i "s/GROOT=.*/GROOT=\"$GROOT\"/" $MNTPOINT/etc/debootstrap/config
+ sed -i "s#RELEASE=.*#RELEASE=\"$RELEASE\"#" $MNTPOINT/etc/debootstrap/config
+ sed -i "s#TARGET=.*#TARGET=\"$TARGET\"#" $MNTPOINT/etc/debootstrap/config
+ sed -i "s#GRUB=.*#GRUB=\"$GRUB\"#" $MNTPOINT/etc/debootstrap/config
+ sed -i "s#GROOT=.*#GROOT=\"$GROOT\"#" $MNTPOINT/etc/debootstrap/config
cp /etc/debootstrap/packages $MNTPOINT/etc/debootstrap/packages
# provide system's /etc/hosts to the target:
if ! [ -f "$MNTPOINT/etc/hosts" ] ; then
cp /etc/hosts $MNTPOINT/etc/hosts
- sed -i "s/127.0.0.1 .*/127.0.0.1 localhost $HOSTNAME/" /etc/hosts
+ sed -i "s#127.0.0.1 .*#127.0.0.1 localhost $HOSTNAME#" /etc/hosts
fi
# setup default locales