mirror of
https://github.com/kairos-io/packages.git
synced 2025-07-17 08:41:58 +00:00
Set a safe date on initrafms (#962)
This commit is contained in:
parent
200042f5bf
commit
b7c07c0bb5
@ -1,4 +1,4 @@
|
|||||||
packages:
|
packages:
|
||||||
- name: "kairos-overlay-files"
|
- name: "kairos-overlay-files"
|
||||||
category: "static"
|
category: "static"
|
||||||
version: "1.1.40"
|
version: "1.1.41"
|
||||||
|
@ -0,0 +1,22 @@
|
|||||||
|
#cloud-config
|
||||||
|
name: "RPI configs"
|
||||||
|
stages:
|
||||||
|
initramfs.before:
|
||||||
|
# set a safe "near" date as default for rpi + alpine without rtc clock as otherwise
|
||||||
|
# the swclock doesnt work as expected and we create a lot of files with their dates at unix epoch
|
||||||
|
# which can lead to wrong calculations (days since login for example)
|
||||||
|
# later in the boot process ntpd or other software clocks will trigger and update the date
|
||||||
|
- name: "Set a safe date before user creation for RPI without hardware clocks"
|
||||||
|
if: '[ -f "/sbin/openrc" ] && [ -f "/proc/device-tree/model" ] && grep -i "Raspberry Pi" "/proc/device-tree/model"'
|
||||||
|
commands:
|
||||||
|
- date -s "2006-08-14 02:34:56-06:00"
|
||||||
|
rootfs.after:
|
||||||
|
# Automatically expand persistent partition on Raspberry Pi 4
|
||||||
|
- if: '[ ! -f /run/cos/recovery_mode ] && [ ! -f /run/cos/live_mode ] && [ -f "/sys/firmware/devicetree/base/model" ] && grep -i "Raspberry Pi 4" "/sys/firmware/devicetree/base/model"'
|
||||||
|
name: "Grow persistent"
|
||||||
|
layout:
|
||||||
|
device:
|
||||||
|
label: COS_PERSISTENT
|
||||||
|
expand_partition:
|
||||||
|
# Size 0 is required to specify all remaining space
|
||||||
|
size: 0
|
@ -1,13 +0,0 @@
|
|||||||
#cloud-config
|
|
||||||
|
|
||||||
stages:
|
|
||||||
rootfs.after:
|
|
||||||
# Automatically expand persistent partition on Raspberry Pi 4
|
|
||||||
- if: '[ ! -f /run/cos/recovery_mode ] && [ ! -f /run/cos/live_mode ] && [ -f "/sys/firmware/devicetree/base/model" ] && grep -i "Raspberry Pi 4" "/sys/firmware/devicetree/base/model"'
|
|
||||||
name: "Grow persistent"
|
|
||||||
layout:
|
|
||||||
device:
|
|
||||||
label: COS_PERSISTENT
|
|
||||||
expand_partition:
|
|
||||||
# Size 0 is required to specify all remaining space
|
|
||||||
size: 0
|
|
Loading…
Reference in New Issue
Block a user