summaryrefslogtreecommitdiff
path: root/libre/linux-libre/linux-chromebook.install
diff options
context:
space:
mode:
Diffstat (limited to 'libre/linux-libre/linux-chromebook.install')
-rw-r--r--libre/linux-libre/linux-chromebook.install17
1 files changed, 9 insertions, 8 deletions
diff --git a/libre/linux-libre/linux-chromebook.install b/libre/linux-libre/linux-chromebook.install
index 02e08464d..54682de7e 100644
--- a/libre/linux-libre/linux-chromebook.install
+++ b/libre/linux-libre/linux-chromebook.install
@@ -1,6 +1,11 @@
-flash_kernel() {
- major=$(mountpoint -d / | cut -f 1 -d ':')
- minor=$(mountpoint -d / | cut -f 2 -d ':')
+post_install () {
+ if mountpoint -q /boot; then
+ major=$(mountpoint -d /boot | cut -f 1 -d ':')
+ minor=$(mountpoint -d /boot | cut -f 2 -d ':')
+ else
+ major=$(mountpoint -d / | cut -f 1 -d ':')
+ minor=$(mountpoint -d / | cut -f 2 -d ':')
+ fi
device=$(cat /proc/partitions | awk {'if ($1 == "'${major}'" && $2 == "'${minor}'") print $4 '})
device="/dev/${device/%2/1}"
@@ -16,10 +21,6 @@ flash_kernel() {
fi
}
-post_install () {
- flash_kernel
-}
-
post_upgrade() {
- flash_kernel
+ post_install
}