Git Product home page Git Product logo

rpi-k8s-node-prep's People

Contributors

aaronkjones avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rpi-k8s-node-prep's Issues

uname -a does not show raspbian

https://github.com/aaronkjones/rpi-k8s-node-prep/blob/master/prep.sh#L14

However...

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.14.50-v7+ #1122 SMP Tue Jun 19 12:26:26 BST 2018 armv7l GNU/Linux

pi@raspberrypi:~ $ cat /etc/os-release | grep raspbian;
ID=raspbian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

pi@raspberrypi:~ $ echo "exit code zero would mean success-> $?"
exit code zero would mean success-> 0

Running your script with #!/bin/bash -x shows:

+ uname -a
+ grep hypriot
+ uname -a
+ grep raspbian
+ [[ '' == \r\a\s\p\b\i\a\n ]]
+ [[ '' == \h\y\p\r\i\o\t ]]
+ echo 'OS type not known'
OS type not known
+ exit 1

You can't pipe bashisms to `sh`

From your README:

curl -sL https://raw.githubusercontent.com/aaronkjones/rpi-k8s-node-prep/master/prep.sh | sudo sh

but you use [[ in your script (and have a #!/bin/bash)

In the least, it should be piping to bash. But really, you shouldn't do that unless everything in the entire script is wrapped in function definitions and the main function is called at the very end to ensure that none of it runs until and unless all of it is downloaded.

For example, see the very end of the file at https://get.docker.com/ All the "actions" are in functions. The begining of the file has a bunch of "bare" code in the top scope, but it is just defining variables. Nothing gets executed until do_install.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.