2 # Copyright (C) 2017 Ian Kelling
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
17 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
23 Initial setup for maru debian for nexus 5.
25 We do this separately because it's constrained for space much more than
26 any other host. The maru debian takes up about 1.5G. We start with about
27 6.8G free. We want to keep a few gigs free to take pictures and
28 movies. I should really trade this in for a 32GB version.
30 -h|--help Print help and exit.
40 scp $
(readlink
-f $
(which rootsshsync
)) maru-init maru@n5
:
41 ssh -t maru@n5 .
/rootsshsync
43 ssh root@n5 bash
<<'EOF'
44 echo "ian ALL=(ALL) NOPASSWD: ALL" >>/etc/sudoers
45 echo n5 >/etc/hostname
46 sed -i '/^127\.0\.1\.1/d' /etc/hosts
47 echo "127.0.1.1 n5.lan n5" >>/etc/hosts
48 hostname -F /etc/hostname
51 usermod -l ian -m -d /home/ian maru
53 useradd -m -s /bin/bash user2
56 # then do myunison n5,