mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-30 14:59:31 +00:00
image_builder: remove numbers
This commit is contained in:
@@ -26,7 +26,7 @@ echo_stamp() {
|
||||
echo -e ${TEXT}
|
||||
}
|
||||
|
||||
echo_stamp "#0 Install apt keys & repos"
|
||||
echo_stamp "Install apt keys & repos"
|
||||
|
||||
# TODO: This STDOUT consist 'OK'
|
||||
curl http://repo.coex.space/aptly_repo_signing.key 2> /dev/null | apt-key add -
|
||||
@@ -37,27 +37,27 @@ apt-get update \
|
||||
echo "deb http://packages.ros.org/ros/ubuntu stretch main" > /etc/apt/sources.list.d/ros-latest.list
|
||||
echo "deb http://repo.coex.space/rpi-ros-kinetic/ stretch main" > /etc/apt/sources.list.d/rpi-ros-kinetic.list
|
||||
|
||||
echo_stamp "#1 Update apt cache"
|
||||
echo_stamp "Update apt cache"
|
||||
|
||||
# TODO: FIX ERROR: /usr/bin/apt-key: 596: /usr/bin/apt-key: cannot create /dev/null: Permission denied
|
||||
apt-get update -qq > /dev/null
|
||||
# && apt upgrade -y
|
||||
|
||||
echo_stamp "#2 Write CLEVER information"
|
||||
echo_stamp "Write CLEVER information"
|
||||
|
||||
# Clever image version
|
||||
echo "$1" >> /etc/clever_version
|
||||
# Origin image file name
|
||||
echo "${2%.*}" >> /etc/clever_origin
|
||||
|
||||
echo_stamp "#3 Write magic script to /etc/rc.local"
|
||||
echo_stamp "Write magic script to /etc/rc.local"
|
||||
MAGIC_SCRIPT="sudo /root/init_rpi.sh; sudo sed -i '/sudo \\\/root\\\/init_rpi.sh/d' /etc/rc.local && sudo reboot"
|
||||
sed -i "19a${MAGIC_SCRIPT}" /etc/rc.local
|
||||
|
||||
# It needs for autosizer.sh & maybe that is correct
|
||||
echo_stamp "#4 Change boot partition"
|
||||
echo_stamp "Change boot partition"
|
||||
sed -i 's/root=[^ ]*/root=\/dev\/mmcblk0p2/' /boot/cmdline.txt
|
||||
sed -i 's/.* \/boot vfat defaults 0 2$/\/dev\/mmcblk0p1 \/boot vfat defaults 0 2/' /etc/fstab
|
||||
sed -i 's/.* \/ ext4 defaults,noatime 0 1$/\/dev\/mmcblk0p2 \/ ext4 defaults,noatime 0 1/' /etc/fstab
|
||||
|
||||
echo_stamp "#4 End of init image"
|
||||
echo_stamp "End of init image"
|
||||
|
||||
Reference in New Issue
Block a user