2 Commits

Author SHA1 Message Date
Jay Larson
35668887a4 The following changes were made:
* Corrected zfs detection in init
  * Moved to use CONFIG rather than usher
2018-08-04 06:26:50 -05:00
Jay Larson
dcf90f69d6 The following changes were made:
* Added URL, REPO, and BRIEF to Makefile
  * usher now uses /bin/sh
  * Removed TARGET from usher
2018-04-04 14:20:41 -05:00
6 changed files with 23 additions and 34 deletions

View File

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

View File

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

View File

@@ -8,9 +8,11 @@
# 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 =
URL = http://snaplinux.org
REPO = core
BRIEF = Scripts to build initrd image
DESC = This package includes scripts to build an initrd image
SNAPVER = 0
@@ -35,5 +37,6 @@ clean:
@rm -rvf $(ROOT) \
$(SNAPINFO) \
$(MANIFEST) \
$(FILES)
$(FILES) \
$(CONFIG)

View File

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

View File

@@ -77,7 +77,11 @@ udevadm settle
[ -f /etc/mdadm.conf ] && mdadm -As
[ -x /sbin/vgchange ] && /sbin/vgchange --sysinit -a y
[ -n "$zfs" ] && zpool import rpool -N || error "Failed importing rpool"
if [ -n "$zfs" ]; then
zpool import rpool -N || error "Failed importing rpool"
fi
[ -n "$rootdelay" ] && sleep "$rootdelay"
[ -n "$rootflags" ] && rootflags="$rootflags,$rorw" || rootflags="$rorw"

View File

@@ -6,7 +6,7 @@ use warnings;
use POSIX qw( uname );
use Data::Dumper;
use constant VERSION => '0.4';
use constant VERSION => '0.7';
sub build {
my $kernel = shift;
@@ -22,6 +22,12 @@ sub build {
mkdir( "$tmpdir/$_", 0755 ) || die( "mkdir(): $tmpdir/$_: $!" );
}
if ( -f '/etc/hostid' ) {
if ( system( "cp -p /etc/hostid $tmpdir/etc" ) ) {
die( "Failed copying hostid" );
}
}
symlink( 'lib', "$tmpdir/lib64" ) ||
die( "symlynk(): $tmpdir/lib64: $!" );
symlink( '/proc/mounts', "$tmpdir/etc/mtab" ) ||
@@ -71,7 +77,7 @@ sub build {
if ( system( "cp -p /etc/modprobe.d/* $tmpdir/etc/modprobe.d" ) ) {
die( "Failed copying data from modprobe.d\n" );
}
if ( system( "cp -rp /etc/udev/{rules.d,udev.conf}"
if ( system( "cp -rp /etc/udev/rules.d /etc/udev/udev.conf"
. " $tmpdir/etc/udev" ) ) {
die( "Failed copying udev data\n" );
}
@@ -87,8 +93,8 @@ sub build {
}
if ( system( "cp /lib/modules/$kernel->{'version'}/"
. "modules.{builtin,order} $tmpdir/lib/modules/"
. "$kernel->{'version'}" ) ) {
. "modules.builtin /lib/modules/$kernel->{'version'}/modules.order"
. " $tmpdir/lib/modules/$kernel->{'version'}" ) ) {
die( "Failed copying module data\n" );
}
if ( system( "depmod -b $tmpdir $kernel->{'version'}" ) ) {