meshenger/lazyinstall/lazyinstall1.sh

39 lines
785 B
Bash
Raw Normal View History

2014-04-24 10:58:10 +02:00
#!/bin/ash
echo 'This is the meshenger lazy install!'
echo 'It presumes your OpenWRT router has a connection to the internet'
echo 'And that you have a properly formatted usb flash drive'
echo 'more info + manual instructions: https://github.com/jngrt/meshenger'
opkg update
opkg install block-mount kmod-usb-storage kmod-usb2 kmod-fs-ext4
2014-04-24 10:58:10 +02:00
sleep 4
echo 'Mounting USB drive'
mkdir /mnt/sda1
mount -t ext4 /dev/sda1 /mnt/sda1
2014-04-24 10:58:10 +02:00
echo 'Cleaning USB drive'
2015-04-15 15:05:41 +02:00
rm -r /mnt/sda1/*
2014-04-24 10:58:10 +02:00
sleep 4
echo 'Copying filesystem to USB drive'
mkdir -p /tmp/cproot
mount --bind / /tmp/cproot
2014-04-24 11:37:39 +02:00
sleep 1
2015-04-15 15:05:41 +02:00
tar -C /tmp/cproot -cvf - . | tar -C /mnt/sda1/ -xf -
2014-04-24 11:37:39 +02:00
sleep 1
umount /tmp/cproot
2014-04-24 10:58:10 +02:00
sleep 4
echo 'Configuring fstab'
mv fstab /etc/config/fstab
2014-04-24 11:37:39 +02:00
echo 'Done configuring you can now reboot using $reboot -f'