Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions installerconfig
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we necessarily want to include these. Some users may have preferences for other things. The items already always included are necessary for Joyent images, which is why they are there.

The rest of this PR looks good though, so if you can fix this then we'll get some builds and test it out.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No... BSD is not linux ... and these dont belong in a base FreeBSD image. you can add them later on your own if you like in my opinion.

env ASSUME_ALWAYS_YES=YES pkg autoremove
env ASSUME_ALWAYS_YES=YES pkg clean -a

Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion triton-freebsd-guesttools/lib/smartdc/add-network-interface
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions triton-freebsd-guesttools/lib/smartdc/format-secondary-disk
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion triton-freebsd-guesttools/lib/smartdc/set-hostname
Original file line number Diff line number Diff line change
Expand Up @@ -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) && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down