diff --git a/device/device-nokia-rx51/APKBUILD b/device/device-nokia-rx51/APKBUILD index 881a2b151..a6cc6e43a 100644 --- a/device/device-nokia-rx51/APKBUILD +++ b/device/device-nokia-rx51/APKBUILD @@ -1,6 +1,6 @@ pkgname=device-nokia-rx51 pkgver=1 -pkgrel=21 +pkgrel=22 pkgdesc="Nokia N900" url="https://github.com/postmarketOS" arch="noarch" @@ -68,4 +68,4 @@ df5dcae9a32d04ba2fed8b4dbb8722f8d56d063a288dfbaeca37806bdbb8ba4de639b392859b9f24 7761aec6e6e219245b006e7bdc1d19812e9c5915cf3e64bb3dd46bb4b5570c1715650b53a1fc1007cb814076b5d81be0a66ba7ebf06d9a1fa4e364725c3ee633 acpi.map c9ff8b5968fe94007e1139db5ae76f3ee6c214356bff297b9672276c6adb332ba2342b6ca54cf7992d6556f3c68a13ef49ae5e61abe86154935514034170e228 rx51_us.map 143c21f0b18a016d37cb44178e9daea09f128a90769b48353c03c3f245cb9b1f7e773b9ccee084973fc78ddd7a18c2642e54888a85bda7c7daecddc9a8c62eff pointercal -7f9f251d08851edb6bd95db8e403d2e3a35d43106e580c922a91c0c4c769657e72645b0d85945bf22111e30df9e6565d62eb16f9dcd7d357569cd6f7c5266e41 device-nokia-rx51.post-install" +a7ce458dd3c6d2b94639b59719ee972fe8c71781c3415f74f5340a4de1c8211853a07c29001ecbca832c471c288bed54b45c37fad05e088c197edc2bd7e7ce1b device-nokia-rx51.post-install" diff --git a/device/device-nokia-rx51/device-nokia-rx51.post-install b/device/device-nokia-rx51/device-nokia-rx51.post-install index 96ccb9139..d3d2d6c96 100644 --- a/device/device-nokia-rx51/device-nokia-rx51.post-install +++ b/device/device-nokia-rx51/device-nokia-rx51.post-install @@ -20,11 +20,6 @@ if [ ! -f $NMC ] || [ -z "$(grep nokia-modem $NMC)" ]; then echo "nokia-modem" >> /etc/modules-load.d/nokia-modem.conf fi -# Add /boot mount point in fstab -if [ -z "$(grep /boot /etc/fstab)" ]; then - echo "/dev/dm-0 /boot ext2 defaults 0 0" >> /etc/fstab -fi - # Set RTC device for hwclock if [ -z "$(grep /dev/rtc0 /etc/conf.d/hwclock)" ]; then sed -i 's/clock_args=\"/clock_args=\" -f \/dev\/rtc/' /etc/conf.d/hwclock diff --git a/main/postmarketos-base/APKBUILD b/main/postmarketos-base/APKBUILD index a940b9eed..62f4e1b3e 100644 --- a/main/postmarketos-base/APKBUILD +++ b/main/postmarketos-base/APKBUILD @@ -1,6 +1,6 @@ pkgname=postmarketos-base pkgver=3 -pkgrel=3 +pkgrel=4 pkgdesc="Meta package for minimal postmarketOS base" url="https://github.com/postmarketOS" arch="noarch" @@ -55,4 +55,4 @@ sha512sums="c6de3b44bc45b9f9c641a7e34c69a481ee39b99ac0251cd28f2b3aae49c1a8d1ca44 3ceeee37f558e7c95ad973692b6a437f997e6b46c3d1c2257ddfb1529a5633477373aa123c7f08164e818daae50acb203d151379f27ca11bd458809e6a0d4de7 swapfile f5cc0f1265955d2646e5f099dd4b5d4c287945bfc18c16044db57670d456f55c678fc11cc59e6dab3fa340832ce869d516302a3a35c13518539ed0cedca51819 swapfile.init e0d2d48b82a03239a4c0a00acaf83e00d397c23a8d7c71053d4e2a383357c22dcedef9e81b0e12a1d7514e1fdbe0bb3eb82613d18b29034a7ce5447f13c84a53 swapfile.conf -eb447f592e0a179f3ae7c508925689a534b13deae8e5864810602ecc0e089d7ab9075dae6c8bf1b3d0415c70e5540305afd03cbba44204214ed2a70d2ee12a1a postmarketos-base.post-install" +44343cdf535f1e4746c190b887af194a872987972425b04ee022f0feb25e74ecb6ac2ebedf90a4eb115efa43a79e155e6ab2ed0f7b40a3bbb5b820a8b86d5757 postmarketos-base.post-install" diff --git a/main/postmarketos-base/postmarketos-base.post-install b/main/postmarketos-base/postmarketos-base.post-install index 527fd165a..637c8c2d0 100644 --- a/main/postmarketos-base/postmarketos-base.post-install +++ b/main/postmarketos-base/postmarketos-base.post-install @@ -26,26 +26,37 @@ fi # Add user account adduser -u 1000 -D -h /home/user -G users user 2>/dev/null -# Adjust welcome messages /etc (unless the files have been modified) -if ! apk audit /etc | grep -q etc/issue; then - { - echo 'Welcome to postmarketOS' - echo 'Kernel \r on an \m (\l)' - } >/etc/issue -fi -if ! apk audit /etc | grep -q etc/motd; then - { - echo 'Welcome to postmarketOS!' - echo '' - echo 'This distribution is based on Alpine Linux.' - echo 'Read both our wikis to find a large amount of how-to guides and' - echo 'general information about administrating and development.' - echo 'See and .' - echo '' - echo 'You may change this message by editing /etc/motd.' - echo '' - } >/etc/motd -fi +write_unless_modified() { + # Redirect the stdin to the file unless it has been modified + # $1: file path + if ! apk audit "$(dirname "$1")" | grep -q "${1:1}"; then + cat > "$1" + fi +} + +# Install /etc/fstab +{ + echo '# ' + echo 'LABEL="pmOS_root" / ext4 relatime,data=ordered 0 1' + echo 'LABEL="pmOS_boot" /boot auto defaults 0 2' +} | write_unless_modified /etc/fstab + +# Adjust welcome messages in /etc +{ + echo 'Welcome to postmarketOS' + echo 'Kernel \r on an \m (\l)' +} | write_unless_modified /etc/issue +{ + echo 'Welcome to postmarketOS!' + echo '' + echo 'This distribution is based on Alpine Linux.' + echo 'Read both our wikis to find a large amount of how-to guides and' + echo 'general information about administrating and development.' + echo 'See and .' + echo '' + echo 'You may change this message by editing /etc/motd.' + echo '' +} | write_unless_modified /etc/motd # Enable syslog to SHM. Note: size is 4048KiB, which *should* be More Than Enough(TM) for all but the most chattiest of devices. sed s/=\"/=\""-C4048 "/ -i /etc/conf.d/syslog diff --git a/main/postmarketos-mkinitfs/APKBUILD b/main/postmarketos-mkinitfs/APKBUILD index 67a80a362..4663630af 100644 --- a/main/postmarketos-mkinitfs/APKBUILD +++ b/main/postmarketos-mkinitfs/APKBUILD @@ -22,5 +22,5 @@ package() { mkdir -p "$pkgdir/etc/postmarketos-mkinitfs/hooks/" } sha512sums="e1849a13ee696e76dc6c734eda984bcc6a6e2e3d8a62a4df0778a8e338dc0bf9d967fa263ae6e57c14a0cb516c6004c6e251262a1711ad47f1ce4c622727a1d7 init.sh.in -0deb35d7e93a4e6d175a935974414732187870f38ab4c8db2dd5cb88c19a98685350c08d1d4152aa0bb6892b263cb5fe5bf4b5c8b73d561cce328963be113628 init_functions.sh +a107e9b49859aa99852a42dc7cbd9815de11c6983c00a2ebd6b9ff53ab6db82aff974d6e715da6aacee3796ae6865a599db5b56a618d90a44c3c4a01fd7bcb01 init_functions.sh e7768173dddd67a7c06a26ccacbc9e1528c5ae652a504df75128def591235e6383e2f6824147629845cac28c270e6c4d9810fd57c5676c8f2b54ad940b6bd42f mkinitfs.sh" diff --git a/main/postmarketos-mkinitfs/init_functions.sh b/main/postmarketos-mkinitfs/init_functions.sh index 0622dae41..dc1f4c56f 100644 --- a/main/postmarketos-mkinitfs/init_functions.sh +++ b/main/postmarketos-mkinitfs/init_functions.sh @@ -182,7 +182,7 @@ resize_root_filesystem() { mount_root_partition() { partition="$(find_root_partition)" echo "Mount root partition ($partition)" - mount -w -t ext4 "$partition" /sysroot + mount -t ext4 -o ro "$partition" /sysroot if ! [ -e /sysroot/usr ]; then echo "ERROR: unable to mount root partition!" show_splash /splash-mounterror.ppm.gz