postmarketos-base: Write /boot to /etc/fstab (#653)

Also removed fstab entry from nokia-rx51 post-install script.
This commit is contained in:
Attila Szöllősi 2017-09-30 23:52:33 +02:00 committed by Oliver Smith
parent 28b49f1dfa
commit 41fcf67bc5
6 changed files with 37 additions and 31 deletions

View file

@ -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"

View file

@ -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

View file

@ -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"

View file

@ -26,14 +26,26 @@ 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
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 '# <file system> <mount point> <type> <options> <dump> <pass>'
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)'
} >/etc/issue
fi
if ! apk audit /etc | grep -q etc/motd; then
} | write_unless_modified /etc/issue
{
echo 'Welcome to postmarketOS!'
echo ''
@ -44,8 +56,7 @@ if ! apk audit /etc | grep -q etc/motd; then
echo ''
echo 'You may change this message by editing /etc/motd.'
echo ''
} >/etc/motd
fi
} | 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

View file

@ -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"

View file

@ -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