Changeset 47015


Ignore:
Timestamp:
2015-09-21T19:41:07+02:00 (2 years ago)
Author:
nbd
Message:

base-files: fix ramoverlay function with kernels 3.18+

Even though there are not many users left within the OpenWrt tree it seems
this function broke during the kernel 3.18 transition.

Fix it by providing a workdir as required by overlayfs.

Signed-off-by: Helmut Schaa <helmut.schaa@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/base-files/files/lib/functions/preinit.sh

    r40404 r47015  
    7676} 
    7777 
    78 fopivot() { # <rw_root> <ro_root> <dupe?> 
    79         /bin/mount -o noatime,lowerdir=/,upperdir=$1 -t overlayfs "overlayfs:$1" /mnt 
    80         pivot /mnt $2 
     78fopivot() { # <rw_root> <work_dir> <ro_root> <dupe?> 
     79        /bin/mount -o noatime,lowerdir=/,upperdir=$1,workdir=$2 -t overlay "overlayfs:$1" /mnt 
     80        pivot /mnt $3 
    8181} 
    8282 
     
    8484        mkdir -p /tmp/root 
    8585        /bin/mount -t tmpfs -o noatime,mode=0755 root /tmp/root 
    86         fopivot /tmp/root /rom 1 
     86        mkdir -p /tmp/root/root /tmp/root/work 
     87        fopivot /tmp/root/root /tmp/root/work /rom 1 
    8788} 
Note: See TracChangeset for help on using the changeset viewer.