blob: 521655b8c239d8dc459b80d373843f48acbcec98 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001#!/bin/sh
2# Copyright (C) 2006 OpenWrt.org
3export INITRAMFS=1
4
5# switch to tmpfs to allow run daemons in jail on initramfs boot
6DIRS=$(echo *)
7NEW_ROOT=/new_root
8
9mkdir -p $NEW_ROOT
10mount -t tmpfs tmpfs $NEW_ROOT
11
12cp -pr $DIRS $NEW_ROOT
13
14exec switch_root $NEW_ROOT /sbin/init