Skip to content

Commit 4acd7df

Browse files
committed
dnf support
1 parent 495d48e commit 4acd7df

4 files changed

Lines changed: 24 additions & 1 deletion

File tree

startupscript/aws/install-mountpoint-s3.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ emit "Installing mountpoint-s3 v${MOUNTPOINT_S3_VERSION} for s3 bucket mounting.
2424
if type apk > /dev/null 2>&1; then
2525
apk update
2626
apk add --no-cache curl gnupg
27+
elif type dnf > /dev/null 2>&1; then
28+
dnf install -y curl gnupg2
2729
elif type apt-get > /dev/null 2>&1; then
2830
apt-get update
2931
apt-get install -y curl gnupg

startupscript/gcp/resource-mount.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,23 @@ if ! which gcsfuse >/dev/null 2>&1; then
2626
go install github.com/googlecloudplatform/gcsfuse/v2@master
2727
cp ${GOPATH}/bin/gcsfuse /usr/bin/gcsfuse
2828

29+
elif type dnf > /dev/null 2>&1; then
30+
emit "Installing gcsfuse from yum repo..."
31+
dnf install -y fuse
32+
if ! dnf repolist | grep -q gcsfuse; then
33+
cat > /etc/yum.repos.d/gcsfuse.repo <<'EOF'
34+
[gcsfuse]
35+
name=gcsfuse (packages.cloud.google.com)
36+
baseurl=https://packages.cloud.google.com/yum/repos/gcsfuse-el7-x86_64
37+
enabled=1
38+
gpgcheck=1
39+
repo_gpgcheck=0
40+
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
41+
https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
42+
EOF
43+
fi
44+
dnf install -y gcsfuse
45+
2946
elif type apt-get > /dev/null 2>&1; then
3047
emit "Installing gcsfuse from apt package..."
3148

startupscript/git-setup.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ rm -f "${USER_SSH_DIR}/id_rsa.tmp"
4343
if type apk > /dev/null 2>&1; then
4444
apk update
4545
apk add --no-cache openssh-client
46+
elif type dnf > /dev/null 2>&1; then
47+
dnf install -y openssh-clients
4648
elif type apt-get > /dev/null 2>&1; then
4749
apt-get update
4850
apt-get install -y openssh-client

startupscript/post-startup.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,11 @@ fi
112112
if type apk > /dev/null 2>&1; then
113113
apk update
114114
apk add --no-cache jq curl fuse tar wget
115+
elif type dnf > /dev/null 2>&1; then
116+
dnf install -y jq curl fuse tar wget
115117
elif type apt-get > /dev/null 2>&1; then
116118
apt-get update
117-
apt install -y jq curl fuse tar wget
119+
apt-get install -y jq curl fuse tar wget
118120
else
119121
>&2 echo "ERROR: Unable to find a supported package manager"
120122
exit 1

0 commit comments

Comments
 (0)