| Index: tools/raspberry-pi2/raspbian-scripts/fletch-configuration
|
| diff --git a/tools/raspberry-pi2/raspbian-scripts/fletch-configuration b/tools/raspberry-pi2/raspbian-scripts/fletch-configuration
|
| deleted file mode 100644
|
| index bb972aaf3d680c6028dacd4f6d8e22dfdc7bfb91..0000000000000000000000000000000000000000
|
| --- a/tools/raspberry-pi2/raspbian-scripts/fletch-configuration
|
| +++ /dev/null
|
| @@ -1,85 +0,0 @@
|
| -#!/bin/sh
|
| -# Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file
|
| -# for details. All rights reserved. Use of this source code is governed by a
|
| -# BSD-style license that can be found in the LICENSE.md file.
|
| -
|
| -### BEGIN INIT INFO
|
| -# Provides: fletch-configuration
|
| -# Required-Start: hostname mountall $syslog
|
| -# Required-Stop:
|
| -# Should-Start:
|
| -# Should-Stop:
|
| -# Default-Start: S
|
| -# Default-Stop:
|
| -# Description: Modify configuration based on files in the boot partition
|
| -### END INIT INFO
|
| -
|
| -PATH=/sbin:/bin
|
| -
|
| -. /lib/init/vars.sh
|
| -. /lib/lsb/init-functions
|
| -
|
| -CONFIGURATION_DIR=/boot/fletch-configuration
|
| -FLETCH_HOSTNAME_CONF="$CONFIGURATION_DIR/hostname"
|
| -HOSTNAME_CONF="/etc/hostname"
|
| -FLETCH_HOSTS_CONF="$CONFIGURATION_DIR/hosts"
|
| -HOSTS_CONF="/etc/hosts"
|
| -
|
| -do_start () {
|
| - # Copy from source to dest if source exists.
|
| - log_action_msg "Running fletch configuration manager"
|
| - if [ -f $FLETCH_HOSTNAME_CONF ]; then
|
| - log_action_begin_msg "Updating $HOSTNAME_CONF"
|
| -
|
| - cp $FLETCH_HOSTNAME_CONF $HOSTNAME_CONF
|
| - chown root:root $HOSTNAME_CONF
|
| - chmod 644 $HOSTNAME_CONF
|
| -
|
| - HOSTNAME="$(cat /etc/hostname)"
|
| - hostname "$HOSTNAME"
|
| - ES=$?
|
| - log_action_end_msg $ES
|
| -
|
| - rm $FLETCH_HOSTNAME_CONF
|
| - fi
|
| -
|
| - if [ -f $FLETCH_HOSTS_CONF ]; then
|
| - log_action_begin_msg "Updating $HOSTS_CONF"
|
| -
|
| - cp $FLETCH_HOSTS_CONF $HOSTS_CONF
|
| - chown root:root $HOSTS_CONF
|
| - chmod 644 $HOSTS_CONF
|
| -
|
| - ES=$?
|
| - log_action_end_msg $ES
|
| -
|
| - rm $FLETCH_HOSTS_CONF
|
| - fi
|
| - log_action_msg "Done fletch configuration manager"
|
| -}
|
| -
|
| -do_status () {
|
| - # Currently status is always OK.
|
| - return 0;
|
| -}
|
| -
|
| -case "$1" in
|
| - start|"")
|
| - do_start
|
| - ;;
|
| - restart|reload|force-reload)
|
| - echo "Error: argument '$1' not supported" >&2
|
| - exit 3
|
| - ;;
|
| - stop)
|
| - # No-op
|
| - ;;
|
| - status)
|
| - do_status
|
| - exit $?
|
| - ;;
|
| - *)
|
| - echo "Usage: fletch-configuration [start|stop]" >&2
|
| - exit 3
|
| - ;;
|
| -esac
|
|
|