Skip to content

Instantly share code, notes, and snippets.

@alex-alex2006hw
Created January 3, 2016 04:30
Show Gist options
  • Save alex-alex2006hw/eb8123a2db28db0beae9 to your computer and use it in GitHub Desktop.
Save alex-alex2006hw/eb8123a2db28db0beae9 to your computer and use it in GitHub Desktop.
# using Alex T's repo
echo "src/gz all http://repo.opkg.net/edison/repo/all" >> /etc/opkg/base-feeds.conf
echo "src/gz edison http://repo.opkg.net/edison/repo/edison" >> /etc/opkg/base-feeds.conf
echo "src/gz core2-32 http://repo.opkg.net/edison/repo/core2-32" >> /etc/opkg/base-feeds.conf
opkg update
opkg install git screen sudo cronie
# addming local users
useradd -M -s /bin/bash admin
useradd -M -s /bin/bash slave
# updating user's home account
cd /home;git clone https://github.com/users-alex/admin.git;chown -R admin: admin
cd /home;git clone https://github.com/users-alex/slave.git;chown -R slave: slave
cd /home;git clone https://github.com/users-alex/www.git;chown -R www-data: www
# gives admin sudo root access
echo "admin ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/99-admin
chown root:root /etc/sudoers.d/99-admin
chmod 0440 /etc/sudoers.d/99-admin
# increase /boot
export bootdrv=$(df -h | grep boot | awk '{ print $1 }')
mkdir -p /home/boot;cd /home/boot;( cd /boot;tar cf - *) | tar xf -
umount /boot;mkfs.vfat -F 32 -n BOOT $bootdrv;mount /boot
cd /boot;(cd /home/boot;tar cf - *) | tar xf -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment