Initial commit: Geminux 0.1.0 (helio) for Planet Computers Gemini PDA (MT6797X)
This commit is contained in:
commit
034c1f61b1
816 files changed
+223435
No files matched your search
Executable
+36
@@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
# Install the target hostname, hosts file and OpenRC hostname link.
|
||||
set -eu
|
||||
|
||||
ROOTFS="${1:-}"
|
||||
DEVICE="${2:-gemini-x27}"
|
||||
|
||||
if [ -z "$ROOTFS" ] || [ ! -d "$ROOTFS" ]; then
|
||||
echo "Usage: $0 <rootfs-dir> [device]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$DEVICE" in
|
||||
gemini-x27|gemini|geminux)
|
||||
HOSTNAME_VAL="geminux"
|
||||
;;
|
||||
*)
|
||||
echo "Error: Unsupported device '$DEVICE' (expected gemini-x27)." >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
mkdir -p "$ROOTFS/etc" "$ROOTFS/etc/runlevels/boot"
|
||||
printf '%s\n' "$HOSTNAME_VAL" > "$ROOTFS/etc/hostname"
|
||||
cat > "$ROOTFS/etc/hosts" <<EOF
|
||||
127.0.0.1 $HOSTNAME_VAL localhost.localdomain localhost
|
||||
::1 $HOSTNAME_VAL localhost ipv6-localhost ipv6-loopback
|
||||
fe00::0 ipv6-localnet
|
||||
ff00::0 ipv6-mcastprefix
|
||||
ff02::1 ipv6-allnodes
|
||||
ff02::2 ipv6-allrouters
|
||||
ff02::3 ipv6-allhosts
|
||||
EOF
|
||||
if [ -e "$ROOTFS/etc/init.d/hostname" ]; then
|
||||
ln -sfn /etc/init.d/hostname "$ROOTFS/etc/runlevels/boot/hostname"
|
||||
fi
|
||||
Reference in new issue
Block a user