diff --git a/installerconfig b/installerconfig index 385e575..4e7c517 100755 --- a/installerconfig +++ b/installerconfig @@ -1,6 +1,6 @@ PARTITIONS=vtbd0 DISTRIBUTIONS="kernel.txz base.txz triton.txz" -BSDINSTALL_DISTSITE=ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/12.0-RELEASE +BSDINSTALL_DISTSITE=ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/12.1-RELEASE #!/bin/sh @@ -75,7 +75,7 @@ env PAGER=cat freebsd-update -f /tmp/freebsd-update.conf install echo "==> Installing packages" env ASSUME_ALWAYS_YES=YES pkg update -f env ASSUME_ALWAYS_YES=YES pkg upgrade -q -y -env ASSUME_ALWAYS_YES=YES pkg install -q -y bash curl node npm wget +env ASSUME_ALWAYS_YES=YES pkg install -q -y bash curl node npm wget vim-console tmux env ASSUME_ALWAYS_YES=YES pkg autoremove env ASSUME_ALWAYS_YES=YES pkg clean -a @@ -84,7 +84,7 @@ sed -i.bak -e s/#PermitRootLogin\ no/PermitRootLogin\ without-password/g /etc/ss ## Build date used for motd and product file BUILDDATE=$(date +%Y%m%d) -RELEASE="12.0-RELEASE" +RELEASE="12.1-RELEASE" DOC_URL="https://docs.joyent.com/images/kvm/freebsd" # Create MOTD diff --git a/triton-freebsd-guesttools/lib/smartdc/add-network-interface b/triton-freebsd-guesttools/lib/smartdc/add-network-interface index dcfc105..883e4c3 100755 --- a/triton-freebsd-guesttools/lib/smartdc/add-network-interface +++ b/triton-freebsd-guesttools/lib/smartdc/add-network-interface @@ -24,7 +24,8 @@ done if [[ "$nic_added" == "y" ]]; then lib_triton_info "Restarting /etc/rc.d/netif" - /etc/rc.d/netif restart + /etc/rc.d/netif restart && \ + /etc/rc.d/routing restart fi exit 0 diff --git a/triton-freebsd-guesttools/lib/smartdc/format-secondary-disk b/triton-freebsd-guesttools/lib/smartdc/format-secondary-disk index e1eff86..296f51a 100755 --- a/triton-freebsd-guesttools/lib/smartdc/format-secondary-disk +++ b/triton-freebsd-guesttools/lib/smartdc/format-secondary-disk @@ -59,9 +59,9 @@ fi # making partition table lib_triton_info "creating gpt partition type /dev/${DATADISKDEVICE}" -gpart create -s gpt $DATADISKDEVICE +$GPART create -s gpt $DATADISKDEVICE -DISKSIZE=$(gpart show /dev/${DATADISKDEVICE} | grep free | cut -d'-' -f3 | cut -d'(' -f2 | cut -d')' -f1) +DISKSIZE=$($GPART show /dev/${DATADISKDEVICE} | grep free | cut -d'-' -f3 | cut -d'(' -f2 | cut -d')' -f1) lib_triton_info "disksize is $DISKSIZE on $DATADISKDEVICE" @@ -73,7 +73,7 @@ lib_triton_info "sleeping for update of partition table for /dev/${DATADISKDEVIC sleep 2 # creating a single partition for the whole disk, formatting it, and mounting it -gpart add -t freebsd-ufs ${DATADISKDEVICE} +$GPART add -t freebsd-ufs ${DATADISKDEVICE} if [[ -e /dev/${DATADISKDEVICE}p1 ]] ; then lib_triton_info "creating new filesystem on /dev/${DATADISKDEVICE}p1" diff --git a/triton-freebsd-guesttools/lib/smartdc/set-hostname b/triton-freebsd-guesttools/lib/smartdc/set-hostname index b1fd75e..7cdec5d 100755 --- a/triton-freebsd-guesttools/lib/smartdc/set-hostname +++ b/triton-freebsd-guesttools/lib/smartdc/set-hostname @@ -6,7 +6,7 @@ # load common functions and vars . /lib/smartdc/common.lib -grep hostname= /etc/rc.conf &>/dev/null +/sbin/sysrc -q -c hostname if [[ $? -ne 0 ]]; then lib_triton_info "No hostname set in /etc/rc.conf." hostname=$($MDATA_GET sdc:hostname) && \ diff --git a/triton-freebsd-guesttools/lib/smartdc/set-root-authorized-keys b/triton-freebsd-guesttools/lib/smartdc/set-root-authorized-keys index 92762c8..02e917a 100755 --- a/triton-freebsd-guesttools/lib/smartdc/set-root-authorized-keys +++ b/triton-freebsd-guesttools/lib/smartdc/set-root-authorized-keys @@ -10,7 +10,10 @@ . /lib/smartdc/common.lib if [[ ! -f /root/.ssh/authorized_keys ]]; then - authorized_keys=$($MDATA_GET root_authorized_keys | awk '{ sub(/(ssh-rsa )/,"\n&"); print }' | awk '{ sub(/(ssh-dss )/,"\n&"); print }' 2>>/dev/console) + authorized_keys=$($MDATA_GET root_authorized_keys | \ + awk '{ sub(/(ssh-ed25519 )/,"\n&"); print }' | \ + awk '{ sub(/(ssh-rsa )/,"\n&"); print }' | \ + awk '{ sub(/(ssh-dss )/,"\n&"); print }' 2>>/dev/console) if [[ -n ${authorized_keys} ]]; then mkdir -p /root/.ssh echo -e "${authorized_keys}" > /root/.ssh/authorized_keys