2 echo $
(date) > /tmp
/myarchlikeinit.log
3 if ! ip a |
grep '^ *inet ' |
grep -vF 127.0.0.1; then
5 We don't have an ipv4 address. Maybe arch doesn't do that for us,
6 or we are probably using an ethernet port
7 which is not the 1st one, so we haven't automatically done dhcpcd,
8 so let's do it on whatever interface has a carrier
10 for f
in /sys
/class
/net
/*; do
11 if [[ `cat $f/carrier` == 1 ]]; then
12 echo $0: running
: dhcpcd
${f##*/}