From 5da4e050f9770667b0d234ace4be83fb78b99437 Mon Sep 17 00:00:00 2001 From: Hilmar Lapp Date: Sat, 13 Feb 2016 20:06:57 -0500 Subject: [PATCH] Cleanup among init scripts. Removes empty files, and removes sudo from init script that is run as root anyway. --- init/ninjablock.conf | 16 ++++++++-------- init/setgpio.conf | 0 init/setserial.conf | 0 3 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 init/setgpio.conf delete mode 100644 init/setserial.conf diff --git a/init/ninjablock.conf b/init/ninjablock.conf index e1fd9a1..0645201 100644 --- a/init/ninjablock.conf +++ b/init/ninjablock.conf @@ -32,11 +32,11 @@ pre-start script # setup serial port for BBW if [ "$NINJA_HARDWARE_TYPE" == "BBW" ]; then - sudo $bin_dir/setserial + $bin_dir/setserial fi # configure gpio pins - sudo $bin_dir/setgpio + $bin_dir/setgpio if [ ! -f /etc/opt/ninja/.has_updated_system ]; then $bin_dir/ninja_update_system @@ -56,12 +56,12 @@ pre-start script if [ ! -f /etc/opt/ninja/.has_updated_utilities ]; then $bin_dir/ninja_update_utilities fi - sudo echo "ubuntu ALL=NOPASSWD: /sbin/ifconfig, /sbin/iwlist" > /etc/sudoers.d/ninja - sudo chmod 0440 /etc/sudoers.d/ninja - sudo chown -R ubuntu:ubuntu /opt/ninja - sudo chown ubuntu:ubuntu /opt/utilities/tmp - sudo chown ubuntu:ubuntu /var/log/ninjablock.log - sudo chown ubuntu:ubuntu /etc/opt/ninja + echo "ubuntu ALL=NOPASSWD: /sbin/ifconfig, /sbin/iwlist" > /etc/sudoers.d/ninja + chmod 0440 /etc/sudoers.d/ninja + chown -R ubuntu:ubuntu /opt/ninja + chown ubuntu:ubuntu /opt/utilities/tmp + chown ubuntu:ubuntu /var/log/ninjablock.log + chown ubuntu:ubuntu /etc/opt/ninja tail -n 1000 /var/log/ninjablock.log > /opt/utilities/tmp/new.log cat /opt/utilities/tmp/new.log>/var/log/ninjablock.log rm /opt/utilities/tmp/new.log diff --git a/init/setgpio.conf b/init/setgpio.conf deleted file mode 100644 index e69de29..0000000 diff --git a/init/setserial.conf b/init/setserial.conf deleted file mode 100644 index e69de29..0000000