The following changes were made:

* Corrected zfs detection in init
  * Moved to use CONFIG rather than usher
This commit is contained in:
2018-08-04 06:26:50 -05:00
parent dcf90f69d6
commit 35668887a4
6 changed files with 11 additions and 46 deletions

View File

@@ -0,0 +1 @@
../default-bins

View File

@@ -0,0 +1 @@
../default-mods

View File

@@ -8,7 +8,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
DEPENDS = coreutils,cpio,eudev,gzip,perl,psmisc,sed,util-linux
DEPENDS = coreutils,cpio,dash,eudev,gzip,perl,psmisc,sed,util-linux
ARCH = x86_64
URL = http://snaplinux.org
REPO = core
@@ -37,5 +37,6 @@ clean:
@rm -rvf $(ROOT) \
$(SNAPINFO) \
$(MANIFEST) \
$(FILES)
$(FILES) \
$(CONFIG)

View File

@@ -1,26 +0,0 @@
#!/bin/sh
set -e
case $1 in
preinst)
exit 0
;;
postinst)
if [ ! -f /usr/share/mkinitramfs/bins/default ]; then
cp /usr/share/mkinitramfs/default-bins \
/usr/share/mkinitramfs/bins/default
fi
if [ ! -f /usr/share/mkinitramfs/mods/default ]; then
cp /usr/share/mkinitramfs/default-mods \
/usr/share/mkinitramfs/mods/default
fi
;;
prerm)
exit 0
;;
postrm)
exit 0
;;
esac

View File

@@ -18,16 +18,9 @@ rorw="ro"
rootflags=
rootdev=
[ -d /dev ] || mkdir -m 0755 /dev
[ -d /root ] || mkdir -m 0700 /root
[ -d /sys ] || mkdir /sys
[ -d /proc ] || mkdir /proc
[ -d /tmp ] || mkdir /tmp
mkdir -p /var/lock
mount -n -t devtmpfs devtmpfs /dev
mount -t proc -o nodev,noexec,nosuid proc /proc
mount -t sysfs -o nodev,noexec,nosuid sysfs /sys
mount -n -t proc proc /proc
mount -n -t sysfs sysfs /sys
mount -n -t tmpfs tmpfs /run
read -r cmdline < /proc/cmdline
@@ -78,12 +71,10 @@ case "$root" in
;;
esac
echo > /sys/kernel/uevent_helper
/sbin/udevd --daemon --resolve-names=never
udevadm trigger
udevadm settle
[ -n "$rootdelay" ] && sleep "$rootdelay"
[ -f /etc/mdadm.conf ] && mdadm -As
[ -x /sbin/vgchange ] && /sbin/vgchange --sysinit -a y
@@ -91,11 +82,8 @@ if [ -n "$zfs" ]; then
zpool import rpool -N || error "Failed importing rpool"
fi
if [ -n "$rootflags" ]; then
rootflags="$rootflags,$rorw"
else
rootflags="$rorw"
fi
[ -n "$rootdelay" ] && sleep "$rootdelay"
[ -n "$rootflags" ] && rootflags="$rootflags,$rorw" || rootflags="$rorw"
mkdir /.root
@@ -103,6 +91,6 @@ if ! mount -n -t "$rootfstype" -o "$rootflags" "$rootdev" /.root ; then
error "Failed to mount root filesystem"
fi
udevadm control --exit
killall -w udevd
exec switch_root /.root "$init" "$@"

View File

@@ -6,7 +6,7 @@ use warnings;
use POSIX qw( uname );
use Data::Dumper;
use constant VERSION => '0.5';
use constant VERSION => '0.7';
sub build {
my $kernel = shift;