Write freedombone commands to the microSD card
This commit is contained in:
parent
69255fc99d
commit
4fd0c97cb0
|
@ -225,6 +225,13 @@ $SUDO sed -i '/iface usb0 inet static/,/ gateway 192.168.7.1/ s/^/#/' $MICROS
|
|||
$SUDO sed -i "s/nameserver.*/nameserver $NAMESERVER1/g" $MICROSD_MOUNT_POINT/$ROOTFS/etc/resolv.conf
|
||||
$SUDO sed -i "/nameserver $NAMESERVER1/a\nameserver $NAMESERVER2" $MICROSD_MOUNT_POINT/$ROOTFS/etc/resolv.conf
|
||||
|
||||
# copy the commands to the card
|
||||
$SUDO cp -f /usr/local/bin/freedombone* $MICROSD_MOUNT_POINT/$ROOTFS/usr/local/bin/
|
||||
if [ ! -f $MICROSD_MOUNT_POINT/$ROOTFS/usr/local/bin/freedombone ]; then
|
||||
echo 'There was a problem with writing freedombone commands to the SD card'
|
||||
exit 8736
|
||||
fi
|
||||
|
||||
# change the motd to show further install instructions
|
||||
echo 'Become the root user by typing:' > $MICROSD_MOUNT_POINT/$ROOTFS/etc/motd
|
||||
echo '' >> $MICROSD_MOUNT_POINT/$ROOTFS/etc/motd
|
||||
|
@ -243,17 +250,12 @@ echo 'then log back in as the user you just created with:' >> $MICROSD_MOUNT_POI
|
|||
echo '' >> $MICROSD_MOUNT_POINT/$ROOTFS/etc/motd
|
||||
echo ' ssh [username]@$BBB_FIXED_IP_ADDRESS' >> $MICROSD_MOUNT_POINT/$ROOTFS/etc/motd
|
||||
echo '' >> $MICROSD_MOUNT_POINT/$ROOTFS/etc/motd
|
||||
echo 'and use the "su" command to become the root user again. You can then load' >> $MICROSD_MOUNT_POINT/$ROOTFS/etc/motd
|
||||
echo 'the freedombone main installation script with:' >> $MICROSD_MOUNT_POINT/$ROOTFS/etc/motd
|
||||
echo '' >> $MICROSD_MOUNT_POINT/$ROOTFS/etc/motd
|
||||
echo ' apt-get update' >> $MICROSD_MOUNT_POINT/$ROOTFS/etc/motd
|
||||
echo ' apt-get -y install git dialog build-essential' >> $MICROSD_MOUNT_POINT/$ROOTFS/etc/motd
|
||||
echo ' git clone https://github.com/bashrc/freedombone.git' >> $MICROSD_MOUNT_POINT/$ROOTFS/etc/motd
|
||||
echo ' cd freedombone' >> $MICROSD_MOUNT_POINT/$ROOTFS/etc/motd
|
||||
echo ' make install' >> $MICROSD_MOUNT_POINT/$ROOTFS/etc/motd
|
||||
echo 'and use the "su" command to become the root user again.' >> $MICROSD_MOUNT_POINT/$ROOTFS/etc/motd
|
||||
echo '' >> $MICROSD_MOUNT_POINT/$ROOTFS/etc/motd
|
||||
echo 'Finally you can use the freedombone command to install a server configuration:' >> $MICROSD_MOUNT_POINT/$ROOTFS/etc/motd
|
||||
echo '' >> $MICROSD_MOUNT_POINT/$ROOTFS/etc/motd
|
||||
echo ' apt-get update' >> $MICROSD_MOUNT_POINT/$ROOTFS/etc/motd
|
||||
echo ' apt-get -y install git dialog build-essential' >> $MICROSD_MOUNT_POINT/$ROOTFS/etc/motd
|
||||
echo ' freedombone menuconfig' >> $MICROSD_MOUNT_POINT/$ROOTFS/etc/motd
|
||||
|
||||
clear
|
||||
|
|
Loading…
Reference in New Issue