Skip to content

Commit

Permalink
Set custom pi user password
Browse files Browse the repository at this point in the history
  • Loading branch information
burtyb committed Nov 27, 2017
1 parent 1941b54 commit b745031
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ MNT=./mnt
# Location of Cluster HAT files on target imagees
CONFIGDIR="/usr/share/clusterhat"

# Default password
PASSWORD=raspberry

# Load local config overrides
if [ -f config-local.sh ];then
source ./config-local.sh
Expand Down
6 changes: 6 additions & 0 deletions build/create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ if [ "$LITE" = "y" ];then
chroot $MNT /bin/bash -c 'APT_LISTCHANGES_FRONTEND=none apt-get -y dist-upgrade'
chroot $MNT apt-get -y install bridge-utils wiringpi screen minicom python-smbus

# Set custom password
chroot $MNT /bin/bash -c "echo 'pi:$PASSWORD' | chpasswd"

# Disable APIPA addresses on ethpiX and eth0
echo -e "# ClusterHAT\ndenyinterfaces eth0 ethpi1 ethpi2 ethpi3 ethpi4" >> $MNT/etc/dhcpcd.conf

Expand Down Expand Up @@ -253,6 +256,9 @@ if [ "$DESKTOP" = "y" ];then
chroot $MNT apt-get -y install bridge-utils wiringpi screen minicom python-smbus
chroot $MNT apt-get -y purge wolfram-engine

# Set custom password
chroot $MNT /bin/bash -c "echo 'pi:$PASSWORD' | chpasswd"

# Disable APIPA addresses on ethpiX and eth0
echo -e "# ClusterHAT\ndenyinterfaces eth0 ethpi1 ethpi2 ethpi3 ethpi4" >> $MNT/etc/dhcpcd.conf

Expand Down

0 comments on commit b745031

Please sign in to comment.