Files
pmaports-rtwo/systemd/postmarketos-base-systemd/rootfs-usr-bin-setup-timezone
T
Caleb Connolly ba85c19be8 systemd/postmarketos-base-systemd: new aport (MR 5563)
postmarketOS base package with systemd stuff.
2025-01-10 13:02:30 +01:00

20 lines
524 B
Bash

#!/bin/sh -e
# Stub that implements a simplified version of Alpine's setup-timezone, so
# pmbootstrap can call it during "pmbootstrap install" without having a
# dependency on alpine-conf, which in turn depends on openrc.
if [ "$#" != "2" ] || [ "$1" != "-i" ]; then
echo "setup-timezone stub from postmarketos-base-systemd"
echo "usage: setup-timezone -i TIMEZONE"
exit 1
fi
TZ_FILE="/usr/share/zoneinfo/$2"
if ! [ -e "$TZ_FILE" ]; then
echo "ERROR: not found: $TZ_FILE"
exit 1
fi
ln -sf "$TZ_FILE" /etc/localtime