From 1399f66200ac7e55ce5e4b9e94c8f87fec3646b8 Mon Sep 17 00:00:00 2001 From: Ahmed Bilal Khalid Date: Sun, 25 Aug 2019 16:21:04 +0500 Subject: [PATCH] a --- ucloud-init.start | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ucloud-init.start b/ucloud-init.start index bf46f5b..bb8f5e2 100755 --- a/ucloud-init.start +++ b/ucloud-init.start @@ -10,11 +10,13 @@ get_distro() { # Main Code Starts here -# Some common path variable declaration +# Some common path variables and command flags + ssh_authorized_keys_path='/root/.ssh/authorized_keys' ssh_config_path='/etc/ssh/ssh_config' sshd_config_path='/etc/ssh/sshd_config' etc_resolv_path='/etc/resolv.conf' +edge_package_flags='--update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted' # Show output of this script if [[ ! -e /etc/conf.d/local ]] && ! grep -q "rc_verbose=yes" /etc/conf.d/local; then @@ -22,10 +24,6 @@ if [[ ! -e /etc/conf.d/local ]] && ! grep -q "rc_verbose=yes" /etc/conf.d/local; fi -# Enable Edge Repo -sed -i -e 's/v[[:digit:]]\.[[:digit:]][[:digit:]]/edge/g' /etc/apk/repositories -apk upgrade --update-cache --available - # Check if rdnssd is installed, if not put ungleich DNS # into /etc/resolv.conf and install rdnssd for the next time if ! $(which rdnssd); then @@ -34,7 +32,7 @@ if ! $(which rdnssd); then echo "nameserver 8.8.8.8" >> $etc_resolv_path echo "nameserver 8.8.4.4" >> $etc_resolv_path - apk add ndisc6 + apk add ndisc6 $edge_package_flags fi # Start rdnssd to get DNS