Skip to content

Commit

Permalink
a e s t h e t i c s .
Browse files Browse the repository at this point in the history
  • Loading branch information
egypcio committed Aug 29, 2017
1 parent 70c3719 commit ec8486f
Showing 1 changed file with 3 additions and 22 deletions.
25 changes: 3 additions & 22 deletions etc/rc.d/digitalocean
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ digitalocean_bootstrap()
{
echo "DigitalOcean: Bootstraping."

# ${sysrc} /etc/rc.conf digitalocean_enable=YES
# ${sysrc} /etc/rc.conf rc_conf_files+=${digitalocean_config}

if ( (${grep} zfs /boot/loader.conf* /etc/rc.conf*) && (${grep} zroot /boot/loader.conf*) ); then
echo " - Recovering/Resizing Disk..."
gpart recover vtbd0
Expand All @@ -48,14 +45,6 @@ digitalocean_bootstrap()
zpool online -e zroot gpt/disk0
fi

# cp /usr/local/etc/cloud/cloud.cfg.d/99-digitalocean.cfg /usr/local/etc/cloud/cloud.cfg
# if [ ! -e /var/lib/cloud/seed/config_drive ]; then
# mkdir -p /var/lib/cloud/seed/config_drive
# ln -sfF /var/lib/cloud/seed /var/lib/cloud/seeds
# else
# mount_cd9660 -o ro -v /dev/vtbd1 /var/lib/cloud/seed/config_drive
# fi

touch ${digitalocean_config}
}

Expand Down Expand Up @@ -144,10 +133,6 @@ digitalocean_networking()
service hostname start
service netif start
service routing start

# if [ ! -z $(${fetch}/interfaces/public/0/ipv6/address) ]; then
# service ip6addrctl restart
# fi
}

digitalocean_start()
Expand Down Expand Up @@ -185,8 +170,10 @@ digitalocean_start()
$(resolvconf -d ${if0})
if [ ! -e "/etc/resolvconf.conf" ]; then
echo "resolvconf=NO" > /etc/resolvconf.conf
echo "resolv_conf=/dev/null" >> /etc/resolvconf.conf
else
${sed} 's/resolvconf=.*/resolvconf=NO/' /etc/resolvconf.conf
${sed} 's/resolv_conf=.*/resolv_conf=\/dev\/null/' /etc/resolvconf.conf
fi
echo "# digitalocean_nameservers=NONE" > /etc/resolv.conf
resolvconf -u
Expand All @@ -197,6 +184,7 @@ digitalocean_start()
echo "resolvconf=YES" > /etc/resolvconf.conf
else
${sed} 's/resolvconf=.*/resolvconf=YES/' /etc/resolvconf.conf
${sed} 's/resolv_conf=.*/resolv_conf=\/etc\/resolv.conf/' /etc/resolvconf.conf
fi
resolvconf -u
${sed} 's/Generated by resolvconf/digitalocean_nameservers="YES"/' /etc/resolv.conf
Expand Down Expand Up @@ -233,17 +221,10 @@ digitalocean_start()
$(chown ${digitalocean_user} /home/${digitalocean_user}/${digitalocean_keys})
$(chmod 0400 /home/${digitalocean_user}/${digitalocean_keys})

# if [ ! -z ${DROPLET_PUBLIC_IP6_ADDR} ]; then
# ${sysrc} /etc/rc.conf ifconfig_${if0}_ipv6="inet6 -ifdisabled"
# ${sysrc} /etc/rc.conf ip6addrctl_policy="ipv6_prefer"
# # ${sysrc} /etc/rc.conf ipv6_activate_all_interfaces="YES"
# fi

digitalocean_networking

$(/sbin/ifconfig ${if0} inet 169.254.${j0}.${j1} netmask 255.255.0.0 -alias)
}

load_rc_config "$name"
run_rc_command "$1"

0 comments on commit ec8486f

Please sign in to comment.