mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-18 20:30:56 +00:00
Merge pull request #699 from jjohnson42/txz
Provide 'txc' mode for packimage
This commit is contained in:
@ -388,6 +388,18 @@ sub process_request {
|
||||
$excludestr = "cat $xcat_packimg_tmpfile|cpio -H newc -o | $compress -c - > ../rootimg.gz";
|
||||
}
|
||||
$oldmask = umask 0077;
|
||||
} elsif ($method =~ /txc/) {
|
||||
if ( ! $exlistloc ) {
|
||||
$excludestr = "find . -xdev | tar --selinux --xattr-include='*' -T - -Jcvf ../rootimg.txz";
|
||||
}else {
|
||||
chdir("$rootimg_dir");
|
||||
system("$excludestr >> $xcat_packimg_tmpfile");
|
||||
if ($includestr) {
|
||||
system("$includestr >> $xcat_packimg_tmpfile");
|
||||
}
|
||||
$excludestr = "cat $xcat_packimg_tmpfile| tar --selinux --xattr-include='*' -T -Jcvf ../rootimg.txz";
|
||||
}
|
||||
$oldmask = umask 0077;
|
||||
} elsif ($method =~ /squashfs/) {
|
||||
$temppath = mkdtemp("/tmp/packimage.$$.XXXXXXXX");
|
||||
chmod 0755,$temppath;
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
echo $drivers
|
||||
dracut_install wget cpio gzip dash modprobe touch echo cut wc
|
||||
dracut_install wget tar xz cpio gzip dash modprobe touch echo cut wc
|
||||
dracut_install -o ctorrent
|
||||
dracut_install grep ifconfig hostname awk egrep grep dirname expr
|
||||
dracut_install mount.nfs
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
echo $drivers
|
||||
dracut_install wget cpio gzip dash modprobe wc touch echo cut
|
||||
dracut_install wget tar xz cpio gzip dash modprobe wc touch echo cut
|
||||
dracut_install -o ctorrent
|
||||
dracut_install grep ifconfig hostname awk egrep grep dirname expr
|
||||
dracut_install parted mke2fs bc mkswap swapon chmod
|
||||
|
@ -77,6 +77,19 @@ elif [ -r /rootimg.gz ]; then
|
||||
fi
|
||||
$NEWROOT/etc/init.d/localdisk
|
||||
echo Done
|
||||
elif [ -r /rootimg.txz ]; then
|
||||
echo Setting up RAM-root tmpfs.
|
||||
if [ -z $rootlimit ];then
|
||||
mount -t tmpfs -o mode=755 rootfs $NEWROOT
|
||||
else
|
||||
mount -t tmpfs -o mode=755,size=$rootlimit rootfs $NEWROOT
|
||||
fi
|
||||
|
||||
cd $NEWROOT
|
||||
echo -n "Extracting root filesystem:"
|
||||
tar -Jxvf /rootimg.txz
|
||||
$NEWROOT/etc/init.d/localdisk
|
||||
echo Done
|
||||
elif [ -r /rootimg-statelite.gz ]; then
|
||||
echo Setting up RAM-root tmpfs for statelite mode.
|
||||
|
||||
|
@ -89,6 +89,19 @@ elif [ -r /rootimg.gz ]; then
|
||||
$NEWROOT/etc/init.d/localdisk
|
||||
[ "$xcatdebugmode" = "1" ] && logger -t xcat -p debug "Done...."
|
||||
echo Done
|
||||
elif [ -r /rootimg.txz ]; then
|
||||
echo Setting up RAM-root tmpfs.
|
||||
if [ -z $rootlimit ];then
|
||||
mount -t tmpfs -o mode=755 rootfs $NEWROOT
|
||||
else
|
||||
mount -t tmpfs -o mode=755,size=$rootlimit rootfs $NEWROOT
|
||||
fi
|
||||
|
||||
cd $NEWROOT
|
||||
echo -n "Extracting root filesystem:"
|
||||
tar -Jxvf /rootimg.txz
|
||||
$NEWROOT/etc/init.d/localdisk
|
||||
echo Done
|
||||
elif [ -r /rootimg-statelite.gz ]; then
|
||||
echo Setting up RAM-root tmpfs for statelite mode.
|
||||
|
||||
|
Reference in New Issue
Block a user