Commit ded9df48 by sungmin

Modified grub serial console jessie, uxenos

 - deleted test file and .bak file
parent 1fbb9dcf
...@@ -35,7 +35,7 @@ then ...@@ -35,7 +35,7 @@ then
cat $FAI/svc-interface >> $target/etc/network/interfaces cat $FAI/svc-interface >> $target/etc/network/interfaces
else else
echo "No svc-interface. So set gateway on NIC1." echo "No svc-interface. So set gateway on NIC1."
echo " gateway $GATEWAY" >> $target/etc/network/interfaces echo " gateway $GATEWAYS" >> $target/etc/network/interfaces
fi fi
# here fcopy is mostly used, when installing a client for running in a # here fcopy is mostly used, when installing a client for running in a
......
...@@ -41,4 +41,7 @@ ainsl -av /etc/fai/fai.conf "FAI_CONFIG_SRC=$FAI_CONFIG_SRC" ...@@ -41,4 +41,7 @@ ainsl -av /etc/fai/fai.conf "FAI_CONFIG_SRC=$FAI_CONFIG_SRC"
fcopy -Miv /etc/fai/fai.conf fcopy -Miv /etc/fai/fai.conf
$ROOTCMD systemctl start getty@ttyS0.service
$ROOTCMD systemctl enable serial-getty@ttyS0.service
exit $error exit $error
...@@ -11,9 +11,6 @@ if [ -z "$BOOT_DEVICE" ]; then ...@@ -11,9 +11,6 @@ if [ -z "$BOOT_DEVICE" ]; then
exit 189 exit 189
fi fi
# disable os-prober because of #788062
ainsl /etc/default/grub 'GRUB_DISABLE_OS_PROBER=true'
# skip the rest, if not an initial installation # skip the rest, if not an initial installation
if [ $FAI_ACTION != "install" ]; then if [ $FAI_ACTION != "install" ]; then
$ROOTCMD update-grub $ROOTCMD update-grub
...@@ -37,6 +34,19 @@ else ...@@ -37,6 +34,19 @@ else
echo "Grub installed on $BOOT_DEVICE = $GROOT" echo "Grub installed on $BOOT_DEVICE = $GROOT"
fi fi
fi fi
# GRUB2 and Jessie with serial console
sed -i "/GRUB_CMDLINE_LINUX_DEFAULT/d" $target/etc/default/grub
sed -i "/GRUB_CMDLINE_LINUX/d" $target/etc/default/grub
ainsl /etc/default/grub 'GRUB_CMDLINE_LINUX_DEFAULT=""'
ainsl /etc/default/grub 'GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200"'
ainsl /etc/default/grub 'GRUB_TERMINAL="console serial"'
ainsl /etc/default/grub 'GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"'
# disable os-prober because of #788062
ainsl /etc/default/grub 'GRUB_DISABLE_OS_PROBER=true'
$ROOTCMD update-grub $ROOTCMD update-grub
exit $error exit $error
...@@ -20,8 +20,8 @@ echo "Finish to install blktap-utils." >> $LOGFILE ...@@ -20,8 +20,8 @@ echo "Finish to install blktap-utils." >> $LOGFILE
INTERFACES="$target/etc/network/interfaces" INTERFACES="$target/etc/network/interfaces"
if [ -f $INTERFACES ] if [ -f $INTERFACES ]
then then
ETH=`grep '^iface.*eth' $INTERFACES|awk '{print $2}' | cut -c 4` ETH_NO=`grep "^iface.*$NIC1" $INTERFACES|awk '{print $2}' | cut -c 4`
for ETH_NO in $ETH;do perl -pi.bak -e "s/eth$ETH_NO inet static/eth$ETH_NO inet manual\\nauto xenbr$ETH_NO\\niface xenbr$ETH_NO inet static\\n \tbridge_ports eth$ETH_NO\\n \tbridge_maxwait 5/g" $INTERFACES;done perl -pi.bak -e "s/$NIC1 inet static/$NIC1 inet manual\\nauto xenbr$ETH_NO\\niface xenbr$ETH_NO inet static\\n bridge_ports $NIC1\\n bridge_maxwait 5/g" $INTERFACES
echo "Finish to set up xen bridge in $INTERFACES." >> $LOGFILE echo "Finish to set up xen bridge in $INTERFACES." >> $LOGFILE
else else
echo "interfaces file is not found($INTERFACES)." >> $LOGFILE echo "interfaces file is not found($INTERFACES)." >> $LOGFILE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment