iankelling.org
/
git
/
automated-distro-installer
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
c90a6fc
)
small updates
author
Ian Kelling
<ian@iankelling.org>
Wed, 4 Jan 2017 20:47:34 +0000
(12:47 -0800)
committer
Ian Kelling
<ian@iankelling.org>
Mon, 6 Feb 2017 06:21:42 +0000
(22:21 -0800)
arch-init
patch
|
blob
|
history
fai/config/distro-install-common/end
patch
|
blob
|
history
fai/config/hooks/instsoft.DEFAULT
patch
|
blob
|
history
myfai-chboot-local
patch
|
blob
|
history
wrt-setup
patch
|
blob
|
history
diff --git
a/arch-init
b/arch-init
index e22b37a7ffdd08d7e71a47e1735b82ecf91526ca..37fa90b092111e7e829a891fadb6c7e3cef6dfcc 100755
(executable)
--- a/
arch-init
+++ b/
arch-init
@@
-48,7
+48,7
@@
export PARTITION_PROMPT=true
# to be idempotent if we fail after partitioning
already_partitioned=true
mount_out=$(mount)
# to be idempotent if we fail after partitioning
already_partitioned=true
mount_out=$(mount)
-for dir in /mnt{,/home,/boot,/
q
}; do
+for dir in /mnt{,/home,/boot,/
a
}; do
regex=" on $dir "
if [[ ! $mount_out =~ $regex ]]; then
already_partitioned=false
regex=" on $dir "
if [[ ! $mount_out =~ $regex ]]; then
already_partitioned=false
@@
-73,8
+73,8
@@
sed -ri --follow-symlinks "/^crypt_dev_\S+$rootn /d" /tmp/fai/crypttab
if ! $already_partitioned; then
mount -o subvol=root_$DISTRO $ROOT_PARTITION /mnt
if ! $already_partitioned; then
mount -o subvol=root_$DISTRO $ROOT_PARTITION /mnt
- mkdir -p /mnt/{
q
,home,boot}
- mount -o subvol=
q $ROOT_PARTITION /mnt/q
+ mkdir -p /mnt/{
a
,home,boot}
+ mount -o subvol=
a $ROOT_PARTITION /mnt/a
mount -o subvol=boot_$DISTRO $BOOT_PARTITION /mnt/boot
fi
mount -o subvol=boot_$DISTRO $BOOT_PARTITION /mnt/boot
fi
@@
-101,7
+101,6
@@
bindmount() {
mkdir -p $mountpoint
mount -o bind $source $mountpoint
}
mkdir -p $mountpoint
mount -o bind $source $mountpoint
}
-bindmount /a /mnt/a
bindmount /root/shadow /mnt/q/root/shadow
mkdir -p /mnt/etc/ssh
bindmount /root/shadow /mnt/q/root/shadow
mkdir -p /mnt/etc/ssh
diff --git
a/fai/config/distro-install-common/end
b/fai/config/distro-install-common/end
index 3735142d3507aa798e1f5d36cceafc61e0a511d6..bc4e816bad77d2e36f3e88548421a1f71a474eed 100755
(executable)
--- a/
fai/config/distro-install-common/end
+++ b/
fai/config/distro-install-common/end
@@
-30,9
+30,9
@@
chpw() {
echo "$0: warning: no pw set for $user" >&2
fi
}
echo "$0: warning: no pw set for $user" >&2
fi
}
-au() {
- if ! $ROOTCMD getent passwd $
1
; then
- $ROOTCMD useradd -m -s /bin/bash $
1 || [[ $? == 9 ]]
+au() {
# add user
+ if ! $ROOTCMD getent passwd $
{@: -1}
; then
+ $ROOTCMD useradd -m -s /bin/bash $
@
fi
}
fi
}
@@
-81,3
+81,5
@@
while true; do
dir=$(dirname $dir)
if [[ $dir == /p ]]; then break; fi
done
dir=$(dirname $dir)
if [[ $dir == /p ]]; then break; fi
done
+
+au -s /bin/false --home-dir /var/lib/bitcoind bitcoin
diff --git
a/fai/config/hooks/instsoft.DEFAULT
b/fai/config/hooks/instsoft.DEFAULT
index de477663758f4fc567be5d2792cdab3685df0d5d..36c0cafd507ac6d1a35ccf3f2bb0a0e62e87f9e0 100755
(executable)
--- a/
fai/config/hooks/instsoft.DEFAULT
+++ b/
fai/config/hooks/instsoft.DEFAULT
@@
-29,6
+29,8
@@
EOF
chmod +x $f
chmod +x $f
+# for hosts which don't have these data volumes, copy the specific
+# files we need.
if ifclass demohost; then
files=(/var/lib/fai/config/distro-install-common/luks/host-demohost)
elif ifclass tp; then
if ifclass demohost; then
files=(/var/lib/fai/config/distro-install-common/luks/host-demohost)
elif ifclass tp; then
diff --git
a/myfai-chboot-local
b/myfai-chboot-local
index 8d4e1ce480bda868f8d3f8546cbe4cbb14963da8..9eac43f028325fe87e9d2860955dabde42841e5e 100755
(executable)
--- a/
myfai-chboot-local
+++ b/
myfai-chboot-local
@@
-19,7
+19,7
@@
kernel=$(fai-chboot -L '^default$' | awk '{print $3}')
# man page doesn't explain this, but this deletes & thus disables
# all chboot systems.
type -t host &>/dev/null || apt-get -y install dnsutils
# man page doesn't explain this, but this deletes & thus disables
# all chboot systems.
type -t host &>/dev/null || apt-get -y install dnsutils
-gateway_ip=$(route -n | sed -rn 's/^
(0\.){3}0\s+(\S+).*/\2
/p')
+gateway_ip=$(route -n | sed -rn 's/^
0\.0\.0\.0\s+(\S+).*/\1
/p')
my_ip=$(host faiserver $gateway_ip | sed -rn 's/^\S+ has address //p')
k_args=$(fai-chboot -L '^default$' | \
sed -r "s/^(\S+\s+){3}(.*root=)(.*)/\2$my_ip:\3/")
my_ip=$(host faiserver $gateway_ip | sed -rn 's/^\S+ has address //p')
k_args=$(fai-chboot -L '^default$' | \
sed -r "s/^(\S+\s+){3}(.*root=)(.*)/\2$my_ip:\3/")
diff --git
a/wrt-setup
b/wrt-setup
index b244bcaa8985955dba072980afbb0db164324e22..82f71934ad72f59b28905226b4f2e27882218758 100755
(executable)
--- a/
wrt-setup
+++ b/
wrt-setup
@@
-172,6
+172,13
@@
v /etc/init.d/nfsd enable
# EOF
# EOF
+v cedit /etc/config/network <<'EOF' || v /etc/init.d/network reload
+config 'route' 'transmission'
+ option 'interface' 'lan'
+ option 'target' '10.173.0.0'
+ option 'netmask' '255.255.0.0'
+ option 'gateway' '192.168.1.2'
+EOF
v cedit /etc/config/firewall <<'EOF' || firewall_restart=true
config redirect
v cedit /etc/config/firewall <<'EOF' || firewall_restart=true
config redirect
@@
-238,10
+245,9
@@
v cedit /etc/hosts <<EOF || dnsmasq_restart=true
72.14.176.105 li
45.33.1.160 lj
138.68.10.24 dopub
72.14.176.105 li
45.33.1.160 lj
138.68.10.24 dopub
-# cant ssh to do when on vpn. some routing/firewall rule or something,
-# I don't know. I can get there from wrt but not my machine.
-# but we can get to it from this address, so, good enough.
-10.8.0.1 do
+# netns creation looks for next free subnet starting at 10.173, but I only
+# use one, and I would keep this one as the first created.
+10.173.0.2 transmission
EOF
EOF