Skip to content

Commit

Permalink
[script] Remove default i2c / only enabled if needed via csmt / Check…
Browse files Browse the repository at this point in the history
… lightsensor during restore
  • Loading branch information
hawkeyexp committed Dec 18, 2018
1 parent 8c0a00a commit d087f70
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 0 additions & 3 deletions stage2/03-crankshaft-base/02-run-chroot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,6 @@ echo "# Make sure client is correct configured for system wide usage" >> /etc/pu
echo "default-server = unix:/var/run/pulse/native" >> /etc/pulse/client.conf
echo "autospawn = no" >> /etc/pulse/client.conf

# Add i2c
echo "i2c_dev" | sudo tee -a /etc/modules

# Make udev mountpoints shared
sed -i 's/^MountFlags=.*/MountFlags=shared/' /lib/systemd/system/systemd-udevd.service

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,17 @@ if [ ! -f /etc/cs_backup_restore_done ]; then
fi

# clean default modules
sed -i 's/i2c_dev//' /etc/modules
sed -i 's/bcm2835_wdt//' /etc/modules
# clean empty lines
sed -i '/./,/^$/!d' /etc/modules
# add default modules
echo "i2c_dev" >> /etc/modules
echo "bcm2835_wdt" >> /etc/modules

# check for lightsnsor (i2c)
if [ -f /etc/cs_lightsensor ]; then
crankshaft lightsensor enable
fi

# set done
mount -o remount,rw /
touch /etc/cs_backup_restore_done
Expand Down

0 comments on commit d087f70

Please sign in to comment.