28 changed files with 6 additions and 2740 deletions
@ -1 +0,0 @@ |
|||
14 |
@ -1,15 +0,0 @@ |
|||
apt-get clean |
|||
#rm -rf /tmp/* |
|||
rm -f /etc/ssh/ssh_host* |
|||
rm -f /root/.bash_history |
|||
rm -f /root/.wget-hsts |
|||
rm -rf /root/.cache |
|||
rm -rf /root/.config |
|||
rm -rf /root/.local |
|||
find /var/log/ -type f | xargs rm -f |
|||
umount /proc |
|||
umount /sys |
|||
umount /dev/pts |
|||
umount /dev |
|||
umount /run |
|||
umount /tmp |
@ -1,3 +0,0 @@ |
|||
#!/bin/bash |
|||
|
|||
(cd rootcopy && cp --parents -afr * /) |
@ -1,27 +0,0 @@ |
|||
# truncate machine id (why??) |
|||
truncate -s 0 /etc/machine-id |
|||
|
|||
# remove diversion (why??) |
|||
rm /sbin/initctl |
|||
dpkg-divert --rename --remove /sbin/initctl |
|||
|
|||
# remove ssh config |
|||
#rm -f /etc/ssh/ssh_host* |
|||
|
|||
# clean up useless stuff |
|||
rm -rf /tmp/* ~/.bash_history |
|||
find /var/log/ -type f | xargs rm -f |
|||
rm -f /etc/ssh/ssh_host* |
|||
rm -f /var/backups/* |
|||
rm -f /var/cache/ldconfig/* |
|||
rm -f /var/cache/debconf/* |
|||
rm -f /var/cache/fontconfig/* |
|||
rm -f /var/cache/apt/archives/*.deb |
|||
rm -f /var/cache/apt/*.bin |
|||
rm -f /var/cache/debconf/*-old |
|||
rm -f /var/lib/apt/extended_states |
|||
rm -f /var/lib/apt/lists/*Packages |
|||
rm -f /var/lib/apt/lists/*Translation* |
|||
rm -f /var/lib/apt/lists/*InRelease |
|||
rm -f /var/lib/apt/lists/deb.* |
|||
rm -f /var/lib/dpkg/*-old |
@ -1,99 +0,0 @@ |
|||
#cloud-config |
|||
|
|||
autoinstall: |
|||
version: 1 |
|||
early-commands: |
|||
# delete any old partition data, up to 240MB size, if this was reinstall |
|||
# erases partition tables and whole boot partition as well, by erasing 30x8MB=240MB (partition is 200MB) |
|||
- dd if=/dev/zero of=/dev/sda bs=8M count=30 |
|||
# create new 200MB boot partition and rest as root partition |
|||
- (echo o; echo n; echo p; echo 1; echo ""; echo +200M; echo n; echo p; echo 2; echo ''; echo ''; echo a; echo 1; echo p; echo w) | fdisk /dev/sda |
|||
# format boot as FAT 32 |
|||
- mkfs.fat -F 32 -D 0x80 -M 0xF8 -n BOOT /dev/sda1 |
|||
# format rest as ext4 |
|||
- mkfs.ext4 -F /dev/sda2 |
|||
# create mount points for boot and root |
|||
- mkdir /mnt/boot /mnt/root |
|||
# don't mount boot yet, as later syslinux requires it unmounted, or mount it here and unmount before syslinux -i |
|||
# - mount /dev/sda1 /mnt/boot |
|||
- mount /dev/sda2 /mnt/root |
|||
# optional commands to see what's mounted, note if you did not mount it, don't ls it because subiquity installer will fail |
|||
# - df -h |
|||
# - ls -al /mnt |
|||
# - ls -al /mnt/boot |
|||
# - ls -al /mnt/root |
|||
# download ubuntu Base from official repo, we download 20.10 below, this will download to / (root) of ubiquity installer, which means - into memory |
|||
# if you want 20.04 or 20.10 or anything else (future releases) just change following these two lines (curl and tar) to reflect that, plus later in script change kernel version |
|||
- curl http://cdimage.ubuntu.com/ubuntu-base/releases/20.10/release/ubuntu-base-20.10-base-amd64.tar.gz -o /ubuntu-base-20.10-base-amd64.tar.gz |
|||
# extract all files to our sda2, mounted at /mnt/root |
|||
- tar -xzvf /ubuntu-base-20.10-base-amd64.tar.gz -C /mnt/root |
|||
# create temporary resolv.conf in the new system |
|||
- touch /mnt/root/etc/resolv.conf |
|||
- echo "nameserver 8.8.8.8" > /mnt/root/etc/resolv.conf |
|||
# chroot to /mnt/root and start executing commands one by one |
|||
# update apt's package cache |
|||
- chroot /mnt/root sh -c "apt-get update" |
|||
# install Linux image, which will install kernel and create initrd and all |
|||
# you need to install specific version depending on OS, eg 20.04 will use linux-image-5.4.0-42-generic |
|||
# we also install: init, dbus, iproute2, sudo, which also pull systemd - to have actually usable system |
|||
# additionally install nano to be able to edit confs, you can change that to any other editor |
|||
- chroot /mnt/root sh -c "apt-get install -y linux-image-5.8.0-28-generic initramfs-tools init dbus iproute2 sudo nano --no-install-recommends" |
|||
# I personally always install openssh-server as well, ping for debugging |
|||
# and you may also want to add isc-dhcp-client package to enable networking setup by DHCP server |
|||
- chroot /mnt/root sh -c "apt-get install -y openssh-server isc-dhcp-client iputils-ping --no-install-recommends" |
|||
# add at least one user, here we add user ubuntu with password ubuntu, change it here or later after first login |
|||
- chroot /mnt/root sh -c "useradd -m ubuntu -s '/bin/bash' && echo ubuntu:ubuntu | chpasswd" |
|||
# add this new user to correct groups to enable it to be admin and to have sudo access |
|||
- chroot /mnt/root sh -c "addgroup ubuntu adm" |
|||
- chroot /mnt/root sh -c "addgroup ubuntu sudo" |
|||
# this would installs Xubuntu ... or switch to whatever you need... if you install some other package or desktop environment - it will be there after your login |
|||
# but it is quite large (2GB) so if ANY package fails or throws ANY error - whole subiquity installer crashes; so I recommend this to be done on first interactive login after reboot |
|||
# - chroot /mnt/root sh -c "apt-get install -y xubuntu-core" |
|||
# below is syslinux install the easy way, through Ubuntu's official package/repo |
|||
# get the syslinux package, note this is not in chroot, this installs just to subiquity memory, so we need to run apt update again |
|||
- apt-get update |
|||
- apt-get install -y syslinux |
|||
# tell syslinux to install itself to your sda1 which is your boot partition |
|||
# if you mounted it earlier, unmount boot!! use command below (which is commented out by default) |
|||
# - umount /mnt/boot |
|||
- syslinux -i /dev/sda1 |
|||
# now that syslinux is installed, burn it's mbr.bin (or maybe gptmbr.bin if you plan to use GPT + UEFI) to start of your disk; note we target whole device "sda" - NOT sda1 |
|||
- dd if=/usr/lib/syslinux/mbr/mbr.bin of=/dev/sda bs=440 count=1 conv=notrunc |
|||
# now we can safely mount boot partition |
|||
- mount /dev/sda1 /mnt/boot |
|||
# we create syslinux.cfg, I do touch, as if it doesn't exist it will break subiquity again |
|||
- touch /mnt/boot/syslinux.cfg |
|||
# echo your config to it; explaining |
|||
# PROMPT 0 - don't ask use default / 1 - ask for user input (good for diag); DEFAULT - set which label is default so syslinux can autoboot; LABEL - this is config for our Ubuntu Base OS; KERNEL - vmlinuz or eqivalent kernel name; APPEND - to mount your /root partiton as writeable; INITRD - name of your initrd image |
|||
- (echo PROMPT 0; echo DEFAULT base; echo LABEL base; echo KERNEL vmlinuz; echo APPEND root=/dev/sda2 rw; echo INITRD initrd.img) > /mnt/boot/syslinux.cfg |
|||
# copy vmlinuz & initrd files that you've installed in your chroot, you can specify exact version, just make sure to change syslinux.cfg echo (above) accordingly |
|||
# can also copy * to copy all, but all we need is these ones really |
|||
- cp /mnt/root/boot/vmlinuz /mnt/boot |
|||
- cp /mnt/root/boot/initrd.img /mnt/boot |
|||
# setup EFI boot, you can keep both BIOS and UEFI bootloaders at the same time |
|||
# install additional package |
|||
- apt-get install -y syslinux-efi |
|||
# create directories, will create both BOOT and parent EFI folders |
|||
- mkdir -p /mnt/boot/EFI/BOOT/ |
|||
# copy all files, in order: UEFI bootloader, bootloader's module (required), syslinux config (same as above), kernel and initrd (same as above) |
|||
- cp /usr/lib/SYSLINUX.EFI/efi64/syslinux.efi /mnt/boot/EFI/BOOT/BOOTX64.EFI |
|||
- cp /usr/lib/syslinux/modules/efi64/ldlinux.e64 /mnt/boot/EFI/BOOT/ |
|||
- cp /mnt/boot/syslinux.cfg /mnt/boot/EFI/BOOT/syslinux.cfg |
|||
- cp /mnt/root/boot/vmlinuz /mnt/boot/EFI/BOOT/ |
|||
- cp /mnt/root/boot/initrd.img /mnt/boot/EFI/BOOT/ |
|||
# now we create network config, make sure to change: interface name, IP, gateway |
|||
- touch /mnt/root/etc/systemd/network/00-wired.network |
|||
- (echo [Match]; echo Name=enp0s10f0; echo [Network]; echo Address=10.10.2.101/24; echo Gateway=10.10.2.99; echo DNS=8.8.8.8) > /mnt/root/etc/systemd/network/00-wired.network |
|||
# and enable networkd service so it runs on first boot already |
|||
- chroot /mnt/root sh -c "systemctl enable systemd-networkd.service" |
|||
# this is optional, but cleans 100+MB from our chroot partition |
|||
- chroot /mnt/root sh -c "apt-get clean" |
|||
# and finally, I leave this uncommented sometimes, to allow me to do anything in interactive bash shell before final reboot (or to just pause and wait for you if you took coffee and don't want your system to reboot unattended) |
|||
# - bash -c "exec bash" |
|||
# unmount partitions |
|||
- umount /mnt/boot |
|||
- umount /mnt/root |
|||
# and reboot! |
|||
- reboot |
|||
# after reboot login with your user (ubuntu/ubuntu in this script) and complete installation and/or configuration |
|||
# you can also connect using ssh to this machine, sudo, and install or configure whatever you wish! Congrats! |
File diff suppressed because it is too large
@ -1,247 +0,0 @@ |
|||
function build_modules_chroot() { |
|||
current_process |
|||
|
|||
if [ $LIVE_TYPE = "casper" ]; then |
|||
#return 0 |
|||
|
|||
chroot_mount_fs |
|||
|
|||
cd $SCRIPT_DIR/linux-live/modules |
|||
|
|||
for MODULE in *; do |
|||
if [ -f $SCRIPT_DIR/linux-live/modules/$MODULE/preinstall ]; then |
|||
cp $SCRIPT_DIR/linux-live/modules/$MODULE/preinstall $BUILDDIR/preinstall |
|||
chmod +x $BUILDDIR/preinstall |
|||
chroot $BUILDDIR /usr/bin/env \ |
|||
OUTPUT=$OUTPUT \ |
|||
LOGPATH=$LOGPATH \ |
|||
BUILD_TEST_ISO=$BUILD_TEST_ISO \ |
|||
CREATE_BACKUP=$CREATE_BACKUP \ |
|||
DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ |
|||
APT_CMD=$APT_CMD \ |
|||
APT_OPTIONS=$APT_OPTIONS \ |
|||
LIVE_TYPE=$LIVE_TYPE \ |
|||
/preinstall >>$OUTPUT 2>&1 |
|||
fi |
|||
|
|||
# copy files |
|||
if [ "$(ls -A $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy)" != "" ]; then |
|||
(cd $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy && cp --parents -afr * $BUILDDIR/) |
|||
fi |
|||
|
|||
# run install script |
|||
if [ -f $SCRIPT_DIR/linux-live/modules/$MODULE/install ]; then |
|||
cp $SCRIPT_DIR/linux-live/modules/$MODULE/install $BUILDDIR/install |
|||
chmod +x $BUILDDIR/install |
|||
if [ -f $SCRIPT_DIR/linux-live/modules/$MODULE/package.list ]; then |
|||
cp $SCRIPT_DIR/linux-live/modules/$MODULE/package.list $BUILDDIR/package.list |
|||
fi |
|||
chroot $BUILDDIR /usr/bin/env \ |
|||
OUTPUT=$OUTPUT \ |
|||
LOGPATH=$LOGPATH \ |
|||
BUILD_TEST_ISO=$BUILD_TEST_ISO \ |
|||
CREATE_BACKUP=$CREATE_BACKUP \ |
|||
DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ |
|||
APT_CMD=$APT_CMD \ |
|||
APT_OPTIONS=$APT_OPTIONS \ |
|||
LIVE_TYPE=$LIVE_TYPE \ |
|||
/install >>$OUTPUT 2>&1 |
|||
fi |
|||
|
|||
# run post-install script |
|||
if [ -f $SCRIPT_DIR/linux-live/modules/$MODULE/postinstall ]; then |
|||
cp $SCRIPT_DIR/linux-live/modules/$MODULE/postinstall $BUILDDIR/postinstall |
|||
chmod +x $BUILDDIR/postinstall |
|||
chroot $BUILDDIR /usr/bin/env \ |
|||
OUTPUT=$OUTPUT \ |
|||
LOGPATH=$LOGPATH \ |
|||
BUILD_TEST_ISO=$BUILD_TEST_ISO \ |
|||
CREATE_BACKUP=$CREATE_BACKUP \ |
|||
DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ |
|||
APT_CMD=$APT_CMD \ |
|||
APT_OPTIONS=$APT_OPTIONS \ |
|||
LIVE_TYPE=$LIVE_TYPE \ |
|||
/postinstall >>$OUTPUT 2>&1 |
|||
fi |
|||
|
|||
chroot_finish_up |
|||
|
|||
chroot_umount_fs |
|||
done |
|||
fi |
|||
|
|||
if [ $CONTAINER_TYPE = "1" ]; then |
|||
if [ ! -f /.minios-live ]; then |
|||
setup_host |
|||
fi |
|||
fi |
|||
|
|||
MODULES_DIR=$PARENT_DIR/modules |
|||
|
|||
cd $SCRIPT_DIR/linux-live/modules |
|||
|
|||
for MODULE in *; do |
|||
if (ls $PARENT_DIR/image/$LIVEKITNAME/*.$BEXT | grep -q $MODULE 2>/dev/null); then |
|||
echo -e "${RED}!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!${ENDCOLOUR}" |
|||
echo -e "Please remove ${MAGENTA}$PARENT_DIR/image/$LIVEKITNAME/$MODULE.$BEXT${ENDCOLOUR} if you want to build ${MAGENTA}$MODULE${ENDCOLOUR}." |
|||
echo -e "${RED}!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!${ENDCOLOUR}" |
|||
else |
|||
MODULE_UPPER_DIR="$MODULES_DIR/$MODULE-upper" |
|||
MODULE_WORK_DIR="$MODULES_DIR/$MODULE-work" |
|||
MODULE_MERGED_DIR="$MODULES_DIR/$MODULE-merged" |
|||
|
|||
module_check_build_dir |
|||
|
|||
module_chroot_mount_fs |
|||
|
|||
# run pre-install script |
|||
if [ -f $SCRIPT_DIR/linux-live/modules/$MODULE/preinstall ]; then |
|||
cp $SCRIPT_DIR/linux-live/modules/$MODULE/preinstall $BUILDDIR/preinstall |
|||
chmod +x $BUILDDIR/preinstall |
|||
chroot $BUILDDIR /usr/bin/env \ |
|||
OUTPUT=$OUTPUT \ |
|||
LOGPATH=$LOGPATH \ |
|||
BUILD_TEST_ISO=$BUILD_TEST_ISO \ |
|||
CREATE_BACKUP=$CREATE_BACKUP \ |
|||
DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ |
|||
APT_CMD=$APT_CMD \ |
|||
APT_OPTIONS=$APT_OPTIONS \ |
|||
LIVE_TYPE=$LIVE_TYPE \ |
|||
/preinstall >>$OUTPUT 2>&1 |
|||
fi |
|||
|
|||
: '# install packages |
|||
if [ -f $SCRIPT_DIR/linux-live/modules/$MODULE/package.list ]; then |
|||
if [ -d /opt/minios-live ] || [ -f /.minios-live-container ]; then |
|||
chroot $BUILDDIR /usr/bin/env \ |
|||
OUTPUT=$OUTPUT \ |
|||
LOGPATH=$LOGPATH \ |
|||
BUILD_TEST_ISO=$BUILD_TEST_ISO \ |
|||
CREATE_BACKUP=$CREATE_BACKUP \ |
|||
DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ |
|||
APT_CMD=$APT_CMD \ |
|||
APT_OPTIONS=$APT_OPTIONS \ |
|||
LIVE_TYPE=$LIVE_TYPE \ |
|||
sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ |
|||
$APT_CMD update >>$OUTPUT 2>&1 && |
|||
chroot $BUILDDIR /usr/bin/env \ |
|||
OUTPUT=$OUTPUT \ |
|||
LOGPATH=$LOGPATH \ |
|||
BUILD_TEST_ISO=$BUILD_TEST_ISO \ |
|||
CREATE_BACKUP=$CREATE_BACKUP \ |
|||
DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ |
|||
APT_CMD=$APT_CMD \ |
|||
APT_OPTIONS=$APT_OPTIONS \ |
|||
LIVE_TYPE=$LIVE_TYPE \ |
|||
sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ |
|||
$APT_CMD install $APT_OPTIONS \ |
|||
$(grep -vE "^\s*#" $SCRIPT_DIR/linux-live/modules/$MODULE/package.list | tr "\n" " ") >>$OUTPUT 2>&1 |
|||
else |
|||
chroot $BUILDDIR sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ |
|||
$APT_CMD update >>$OUTPUT 2>&1 && |
|||
chroot $BUILDDIR sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ |
|||
$APT_CMD install $APT_OPTIONS \ |
|||
$(grep -vE "^\s*#" $SCRIPT_DIR/linux-live/modules/$MODULE/package.list | tr "\n" " ") >>$OUTPUT 2>&1 |
|||
fi |
|||
fi' |
|||
|
|||
# copy files |
|||
if [ "$(ls -A $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy)" != "" ]; then |
|||
(cd $SCRIPT_DIR/linux-live/modules/$MODULE/rootcopy && cp --parents -afr * $BUILDDIR/) |
|||
fi |
|||
|
|||
# run install script |
|||
if [ -f $SCRIPT_DIR/linux-live/modules/$MODULE/install ]; then |
|||
cp $SCRIPT_DIR/linux-live/modules/$MODULE/install $BUILDDIR/install |
|||
chmod +x $BUILDDIR/install |
|||
if [ -f $SCRIPT_DIR/linux-live/modules/$MODULE/package.list ]; then |
|||
cp $SCRIPT_DIR/linux-live/modules/$MODULE/package.list $BUILDDIR/package.list |
|||
fi |
|||
chroot $BUILDDIR /usr/bin/env \ |
|||
OUTPUT=$OUTPUT \ |
|||
LOGPATH=$LOGPATH \ |
|||
BUILD_TEST_ISO=$BUILD_TEST_ISO \ |
|||
CREATE_BACKUP=$CREATE_BACKUP \ |
|||
DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ |
|||
APT_CMD=$APT_CMD \ |
|||
APT_OPTIONS=$APT_OPTIONS \ |
|||
LIVE_TYPE=$LIVE_TYPE \ |
|||
/install >>$OUTPUT 2>&1 |
|||
fi |
|||
|
|||
# run post-install script |
|||
if [ -f $SCRIPT_DIR/linux-live/modules/$MODULE/postinstall ]; then |
|||
cp $SCRIPT_DIR/linux-live/modules/$MODULE/postinstall $BUILDDIR/postinstall |
|||
chmod +x $BUILDDIR/postinstall |
|||
chroot $BUILDDIR /usr/bin/env \ |
|||
OUTPUT=$OUTPUT \ |
|||
LOGPATH=$LOGPATH \ |
|||
BUILD_TEST_ISO=$BUILD_TEST_ISO \ |
|||
CREATE_BACKUP=$CREATE_BACKUP \ |
|||
DEBIAN_FRONTEND_TYPE=$DEBIAN_FRONTEND_TYPE \ |
|||
APT_CMD=$APT_CMD \ |
|||
APT_OPTIONS=$APT_OPTIONS \ |
|||
LIVE_TYPE=$LIVE_TYPE \ |
|||
/postinstall >>$OUTPUT 2>&1 |
|||
fi |
|||
|
|||
module_chroot_finish_up |
|||
|
|||
module_chroot_umount_fs |
|||
|
|||
if [ ! -f $PARENT_DIR/image/$LIVEKITNAME/$MODULE.$BEXT ]; then |
|||
build_modules_live |
|||
fi |
|||
|
|||
fi |
|||
done |
|||
} |
|||
|
|||
function build_modules_live() { |
|||
current_process |
|||
|
|||
if [ $LIVE_TYPE = "casper" ]; then |
|||
return 0 |
|||
fi |
|||
|
|||
if [ $CONTAINER_TYPE = "1" ]; then |
|||
if [ ! -f /.minios-live ]; then |
|||
setup_host |
|||
fi |
|||
fi |
|||
|
|||
MODULES_DIR=$PARENT_DIR/modules |
|||
|
|||
cd $SCRIPT_DIR/linux-live/modules |
|||
|
|||
for MODULE in *; do |
|||
|
|||
if (ls $PARENT_DIR/image/$LIVEKITNAME/*.$BEXT | grep -q $MODULE 2>/dev/null); then |
|||
echo -e "${RED}!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!${ENDCOLOUR}" |
|||
echo -e "Please remove ${MAGENTA}$PARENT_DIR/image/$LIVEKITNAME/$MODULE.$BEXT${ENDCOLOUR} if you want to build ${MAGENTA}$MODULE${ENDCOLOUR}." |
|||
echo -e "${RED}!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!${ENDCOLOUR}" |
|||
else |
|||
|
|||
MODULE_UPPER_DIR="$MODULES_DIR/$MODULE-upper" |
|||
MODULE_WORK_DIR="$MODULES_DIR/$MODULE-work" |
|||
MODULE_MERGED_DIR="$MODULES_DIR/$MODULE-merged" |
|||
|
|||
if [ "$(ls -A $MODULE_UPPER_DIR)" != "" ]; then |
|||
|
|||
# create compressed 01-core.sb |
|||
: 'cd $MODULE_UPPER_DIR |
|||
COREFS="" |
|||
for i in $MKMOD; do |
|||
if [ -d /$i ]; then |
|||
COREFS="$COREFS $i" |
|||
fi |
|||
done |
|||
mksquashfs $COREFS $PARENT_DIR/image/$LIVEKITNAME/$MODULE.$BEXT -comp $COMP_TYPE -b 1024K -always-use-fragments -keep-as-directory -noappend || exit' |
|||
|
|||
mksquashfs $MODULE_UPPER_DIR $PARENT_DIR/image/$LIVEKITNAME/$MODULE-$COMP_TYPE.$BEXT -comp $COMP_TYPE -b 1024K -always-use-fragments -noappend || exit |
|||
else |
|||
echo -e "${MAGENTA}$BUILD_DIR${ENDCOLOUR} is empty. Nothing to do." |
|||
fi |
|||
fi |
|||
done |
|||
} |
@ -1,13 +0,0 @@ |
|||
#!/bin/bash |
|||
# ! Не используйте это, если не понимаете, как оно работает. |
|||
apt update -y && apt install -y inotify-tools && apt clean |
|||
inotifywait -m /build/iso -e close_write | |
|||
while read path action file; do |
|||
echo "The file '$file' appeared in directory '$path' via '$action'" |
|||
if [ $action != "CREATE,ISDIR" ]; then |
|||
xhost + >/dev/null 2>/dev/null |
|||
#find $path ! -name "$file" -type f -exec rm -f {""} + |
|||
cp $path$file /mnt/build/iso/minios.iso |
|||
mv $path$file /mnt/build/iso/ |
|||
fi |
|||
done |
@ -1,37 +0,0 @@ |
|||
#!/bin/bash |
|||
|
|||
set -e # exit on error |
|||
set -o pipefail # exit on pipeline error |
|||
set -u # treat unset variable as error |
|||
|
|||
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" |
|||
|
|||
# install packages |
|||
if [ -f $SCRIPT_DIR/package.list ]; then |
|||
sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ |
|||
$APT_CMD update >>$OUTPUT 2>&1 && |
|||
sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ |
|||
$APT_CMD install $APT_OPTIONS \ |
|||
$(grep -vE "^\s*#" $SCRIPT_DIR/package.list | tr "\n" " ") >>$OUTPUT 2>&1 |
|||
fi |
|||
|
|||
cd /root |
|||
#apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CB2DE8E5 >>$OUTPUT 2>&1 |
|||
#echo "deb https://download.onlyoffice.com/repo/debian squeeze main" >/etc/apt/sources.list.d/onlyoffice.list >>$OUTPUT 2>&1 |
|||
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - >>$OUTPUT 2>&1 |
|||
wget -c https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb >>$OUTPUT 2>&1 |
|||
sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ |
|||
$APT_CMD update |
|||
#sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ |
|||
# $APT_CMD install $APT_OPTIONS onlyoffice-desktopeditors |
|||
sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \ |
|||
$APT_CMD install $APT_OPTIONS /root/google-chrome-stable_current_amd64.deb /root/cts-4.0.0-104.ks1_amd64.deb >>$OUTPUT 2>&1 |
|||
|
|||
if [ -d /home/live ]; then |
|||
mkdir -p /home/live/.cts |
|||
cp /etc/skel/.cts/settings.conf /home/live/.cts/ |
|||
chmod 755 /home/live/.cts |
|||
chown live:live /home/live/.cts |
|||
chmod 644 /home/live/.cts/settings.conf |
|||
chown live:live /home/live/.cts/settings.conf |
|||
fi |
@ -1,8 +0,0 @@ |
|||
open-vm-tools-desktop |
|||
#firefox |
|||
#firefox-locale-ru |
|||
remmina |
|||
parole |
|||
recordmydesktop |
|||
#compizconfig-settings-manager |
|||
#compiz-plugins |
@ -1,10 +0,0 @@ |
|||
#!/bin/bash |
|||
|
|||
set -e # exit on error |
|||
set -o pipefail # exit on pipeline error |
|||
set -u # treat unset variable as error |
|||
|
|||
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" |
|||
|
|||
rm -f /root/google-chrome-stable_current_amd64.deb >>$OUTPUT 2>&1 |
|||
rm -f /root/cts-4.0.0-104.ks1_amd64.deb >>$OUTPUT 2>&1 |
@ -1,4 +0,0 @@ |
|||
{ |
|||
"id": " ", |
|||
"version": 1 |
|||
} |
@ -1 +0,0 @@ |
|||
{"cert_ask_for_adding":true,"cert_check_against_crl":false,"cert_warning_expiration_days":14,"crl_allowed_expiration_days":0,"crl_auto_update":true,"crl_update_period":24} |
@ -1 +0,0 @@ |
|||
{"city":"","configVersion":1,"department":"","email":"","firstName":"","host":"cap","lastName":"","middleName":"","organization":"","protectionClass":"KC1"} |
@ -1 +0,0 @@ |
|||
WebBrowser=google-chrome |
@ -1,15 +0,0 @@ |
|||
[Desktop Entry] |
|||
Version=1.0 |
|||
Type=Application |
|||
Exec=exo-open --launch FileManager %u |
|||
Icon=system-file-manager |
|||
StartupNotify=true |
|||
Terminal=false |
|||
Categories=Utility;X-XFCE;X-Xfce-Toplevel; |
|||
OnlyShowIn=XFCE; |
|||
X-XFCE-MimeType=inode/directory;x-scheme-handler/trash; |
|||
Name=File Manager |
|||
Name[ru]=Файловый менеджер |
|||
Comment=Browse the file system |
|||
Comment[ru]=Просмотреть файловую систему |
|||
X-XFCE-Source=file:///usr/share/applications/exo-file-manager.desktop |
@ -1,16 +0,0 @@ |
|||
[Desktop Entry] |
|||
Version=1.0 |
|||
Type=Application |
|||
Exec=exo-open --launch WebBrowser %u |
|||
Icon=web-browser |
|||
StartupNotify=true |
|||
Terminal=false |
|||
Categories=Network;X-XFCE;X-Xfce-Toplevel; |
|||
OnlyShowIn=XFCE; |
|||
X-XFCE-MimeType=x-scheme-handler/http;x-scheme-handler/https; |
|||
Name=Web Browser |
|||
Name[ru]=Веб-браузер |
|||
Comment=Browse the web |
|||
Comment[ru]=Смотреть в Интернете |
|||
X-XFCE-Source=file:///usr/share/applications/exo-web-browser.desktop |
|||
Path= |
@ -1,14 +0,0 @@ |
|||
[Desktop Entry] |
|||
Version=1.0 |
|||
Type=Application |
|||
Exec=exo-open --launch TerminalEmulator |
|||
Icon=utilities-terminal |
|||
StartupNotify=true |
|||
Terminal=false |
|||
Categories=Utility;X-XFCE;X-Xfce-Toplevel; |
|||
OnlyShowIn=XFCE; |
|||
Name=Terminal Emulator |
|||
Name[ru]=Эмулятор терминала |
|||
Comment=Use the command line |
|||
Comment[ru]=Использовать командную строку |
|||
X-XFCE-Source=file:///usr/share/applications/exo-terminal-emulator.desktop |
@ -1,68 +0,0 @@ |
|||
favorites=RDWebAccess.desktop,RDWebClient.desktop,org.remmina.Remmina.desktop,ctsg.desktop,ctskeyimportg.desktop,ubiquity.desktop |
|||
recent= |
|||
button-title=Applications Menu |
|||
button-icon=MiniOS-white |
|||
button-single-row=false |
|||
show-button-title=false |
|||
show-button-icon=true |
|||
launcher-show-name=true |
|||
launcher-show-description=false |
|||
launcher-show-tooltip=true |
|||
item-icon-size=2 |
|||
hover-switch-category=false |
|||
category-show-name=true |
|||
category-icon-size=1 |
|||
load-hierarchy=true |
|||
recent-items-max=10 |
|||
favorites-in-recent=true |
|||
display-recent-default=false |
|||
position-search-alternate=true |
|||
position-commands-alternate=false |
|||
position-categories-alternate=false |
|||
menu-width=400 |
|||
menu-height=500 |
|||
menu-opacity=100 |
|||
command-settings=xfce4-settings-manager |
|||
show-command-settings=true |
|||
command-lockscreen=xflock4 |
|||
show-command-lockscreen=true |
|||
command-switchuser=dm-tool switch-to-greeter |
|||
show-command-switchuser=false |
|||
command-logout=xfce4-session-logout |
|||
show-command-logout=true |
|||
command-menueditor=menulibre |
|||
show-command-menueditor=true |
|||
command-profile=mugshot |
|||
show-command-profile=true |
|||
search-actions=5 |
|||
|
|||
[action0] |
|||
name=Man-страницы |
|||
pattern=# |
|||
command=exo-open --launch TerminalEmulator man %s |
|||
regex=false |
|||
|
|||
[action1] |
|||
name=Web-поиск |
|||
pattern=? |
|||
command=exo-open --launch WebBrowser https://duckduckgo.com/?q=%u |
|||
regex=false |
|||
|
|||
[action2] |
|||
name=Википедия |
|||
pattern=!w |
|||
command=exo-open --launch WebBrowser https://en.wikipedia.org/wiki/%u |
|||
regex=false |
|||
|
|||
[action3] |
|||
name=Выполнить в терминале |
|||
pattern=! |
|||
command=exo-open --launch TerminalEmulator %s |
|||
regex=false |
|||
|
|||
[action4] |
|||
name=Открыть URI |
|||
pattern=^(file|http|https):\\/\\/(.*)$ |
|||
command=exo-open \\0 |
|||
regex=true |
|||
|
@ -1,123 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
|
|||
<channel name="xfce4-panel" version="1.0"> |
|||
<property name="panels" type="uint" value="1"> |
|||
<property name="panel-0" type="empty"> |
|||
<property name="position" type="string" value="p=8;x=1109;y=1275"/> |
|||
<property name="length" type="uint" value="100"/> |
|||
<property name="position-locked" type="bool" value="true"/> |
|||
<property name="plugin-ids" type="array"> |
|||
<value type="int" value="1"/> |
|||
<value type="int" value="21"/> |
|||
<value type="int" value="23"/> |
|||
<value type="int" value="19"/> |
|||
<value type="int" value="24"/> |
|||
<value type="int" value="22"/> |
|||
<value type="int" value="2"/> |
|||
<value type="int" value="3"/> |
|||
<value type="int" value="5"/> |
|||
<value type="int" value="4"/> |
|||
<value type="int" value="7"/> |
|||
<value type="int" value="6"/> |
|||
<value type="int" value="9"/> |
|||
<value type="int" value="10"/> |
|||
<value type="int" value="11"/> |
|||
<value type="int" value="12"/> |
|||
</property> |
|||
<property name="background-style" type="uint" value="0"/> |
|||
<property name="background-alpha" type="uint" value="60"/> |
|||
<property name="size" type="uint" value="32"/> |
|||
<property name="length-adjust" type="bool" value="true"/> |
|||
<property name="span-monitors" type="bool" value="false"/> |
|||
<property name="enter-opacity" type="uint" value="100"/> |
|||
<property name="leave-opacity" type="uint" value="100"/> |
|||
<property name="mode" type="uint" value="0"/> |
|||
<property name="autohide-behavior" type="uint" value="0"/> |
|||
<property name="nrows" type="uint" value="1"/> |
|||
</property> |
|||
</property> |
|||
<property name="plugins" type="empty"> |
|||
<property name="plugin-1" type="string" value="whiskermenu"/> |
|||
<property name="plugin-2" type="string" value="tasklist"> |
|||
<property name="flat-buttons" type="bool" value="true"/> |
|||
<property name="show-handle" type="bool" value="false"/> |
|||
<property name="show-labels" type="bool" value="false"/> |
|||
</property> |
|||
<property name="plugin-3" type="string" value="separator"> |
|||
<property name="style" type="uint" value="0"/> |
|||
<property name="expand" type="bool" value="true"/> |
|||
</property> |
|||
<property name="plugin-4" type="string" value="systray"> |
|||
<property name="show-frame" type="bool" value="false"/> |
|||
<property name="size-max" type="uint" value="22"/> |
|||
<property name="names-visible" type="array"> |
|||
<value type="string" value="thunar"/> |
|||
<value type="string" value="ctsg"/> |
|||
</property> |
|||
<property name="names-hidden" type="array"> |
|||
<value type="string" value="network"/> |
|||
<value type="string" value="xfce4-power-manager"/> |
|||
<value type="string" value="сеть"/> |
|||
<value type="string" value="апплет networkmanager"/> |
|||
<value type="string" value="networkmanager applet"/> |
|||
<value type="string" value="remmina"/> |
|||
</property> |
|||
</property> |
|||
<property name="plugin-9" type="string" value="pulseaudio"> |
|||
<property name="enable-keyboard-shortcuts" type="bool" value="true"/> |
|||
<property name="enable-mpris" type="bool" value="true"/> |
|||
<property name="mixer-command" type="string" value="pavucontrol"/> |
|||
<property name="mpris-players" type="string" value="parole"/> |
|||
<property name="show-notifications" type="bool" value="true"/> |
|||
</property> |
|||
<property name="plugin-10" type="string" value="separator"> |
|||
<property name="style" type="uint" value="0"/> |
|||
<property name="expand" type="bool" value="false"/> |
|||
</property> |
|||
<property name="plugin-11" type="string" value="clock"> |
|||
<property name="digital-format" type="string" value="%d %b, %H:%M"/> |
|||
</property> |
|||
<property name="plugin-12" type="string" value="showdesktop"/> |
|||
<property name="plugin-19" type="string" value="launcher"> |
|||
<property name="items" type="array"> |
|||
<value type="string" value="16093657651.desktop"/> |
|||
</property> |
|||
</property> |
|||
<property name="plugin-21" type="string" value="separator"> |
|||
<property name="style" type="uint" value="0"/> |
|||
</property> |
|||
<property name="plugin-22" type="string" value="separator"> |
|||
<property name="style" type="uint" value="0"/> |
|||
</property> |
|||
<property name="plugin-23" type="string" value="launcher"> |
|||
<property name="items" type="array"> |
|||
<value type="string" value="16093659533.desktop"/> |
|||
</property> |
|||
<property name="show-label" type="bool" value="false"/> |
|||
<property name="disable-tooltips" type="bool" value="false"/> |
|||
</property> |
|||
<property name="plugin-24" type="string" value="launcher"> |
|||
<property name="items" type="array"> |
|||
<value type="string" value="16093659584.desktop"/> |
|||
</property> |
|||
</property> |
|||
<property name="plugin-5" type="string" value="xkb"> |
|||
<property name="display-scale" type="uint" value="50"/> |
|||
<property name="display-tooltip-icon" type="bool" value="true"/> |
|||
<property name="group-policy" type="uint" value="0"/> |
|||
<property name="display-type" type="uint" value="2"/> |
|||
<property name="display-name" type="uint" value="1"/> |
|||
</property> |
|||
<property name="plugin-7" type="string" value="statusnotifier"> |
|||
<property name="known-items" type="array"> |
|||
<value type="string" value="ctsg"/> |
|||
<value type="string" value="remmina-icon"/> |
|||
<value type="string" value="nm-applet"/> |
|||
</property> |
|||
<property name="hidden-items" type="array"> |
|||
</property> |
|||
</property> |
|||
<property name="plugin-6" type="string" value="power-manager-plugin"/> |
|||
</property> |
|||
<property name="configver" type="int" value="2"/> |
|||
</channel> |
@ -1,4 +0,0 @@ |
|||
[settings] |
|||
auto_connect=false |
|||
auto_disconnect=true |
|||
minimize_on_start=true |
Binary file not shown.
@ -1,17 +0,0 @@ |
|||
[Desktop Entry] |
|||
Version=1.0 |
|||
Name=RD Web Access |
|||
Name[ru]=Веб-доступ к удаленным рабочим столам |
|||
GenericName=Remote Desktop Web Access |
|||
GenericName[ru]=Веб-доступ к удаленным рабочим столам |
|||
X-GNOME-FullName=Remote Desktop Web |
|||
Comment=RemoteApp and Desktop Connection |
|||
Comment[ru]=Подключение к удаленным рабочим столам и приложениям RemoteApp |
|||
Exec=/opt/google/chrome/google-chrome --profile-directory=Default --app="https://rd.niitnn.tn.corp/RDWeb" |
|||
Icon=preferences-desktop-remote-desktop |
|||
Terminal=false |
|||
Type=Application |
|||
Categories=GTK;GNOME;X-GNOME-NetworkSettings;Network; |
|||
Keywords=remote desktop;rdp |
|||
Path= |
|||
StartupNotify=false |
@ -1,17 +0,0 @@ |
|||
[Desktop Entry] |
|||
Version=1.0 |
|||
Name=RD Web Client |
|||
Name[ru]=Веб-клиент удаленных рабочих столов |
|||
GenericName=Remote Desktop Web Client |
|||
GenericName[ru]=Веб-клиент доступа к удаленным рабочим столам |
|||
X-GNOME-FullName=Remote Desktop Web |
|||
Comment=RemoteApp and Desktop Connection |
|||
Comment[ru]=Подключение к удаленным рабочим столам и приложениям RemoteApp |
|||
Exec=/opt/google/chrome/google-chrome --profile-directory=Default --app="https://rd.niitnn.tn.corp/RDWeb/WebClient" |
|||
Icon=/usr/share/icons/hicolor/apps/microsoft-remote-desktop.png |
|||
Terminal=false |
|||
Type=Application |
|||
Categories=GTK;GNOME;X-GNOME-NetworkSettings;Network; |
|||
Keywords=remote desktop;rdp |
|||
Path= |
|||
StartupNotify=false |
Before Width: | Height: | Size: 5.9 KiB |
@ -1,34 +0,0 @@ |
|||
version: "3.6" |
|||
services: |
|||
wg-gen-web: |
|||
image: vx3r/wg-gen-web:latest |
|||
container_name: wg-gen-web |
|||
restart: unless-stopped |
|||
expose: |
|||
- "8080/tcp" |
|||
environment: |
|||
- WG_CONF_DIR=/data |
|||
- WG_INTERFACE_NAME=wg0.conf |
|||
- SMTP_HOST=mail.crims0n.ru |
|||
- SMTP_PORT=587 |
|||
- SMTP_USERNAME=no-reply@crims0n.ru |
|||
- SMTP_PASSWORD=4ys4eUVNcVCuvJ |
|||
- SMTP_FROM=Wg Gen Web <no-reply@crims0n.ru> |
|||
- OAUTH2_PROVIDER_NAME=github |
|||
- OAUTH2_PROVIDER=https://github.com |
|||
- OAUTH2_CLIENT_ID=1347a6c5a942ca0a52ed |
|||
- OAUTH2_CLIENT_SECRET=2f1d162b2d8d82bc58f685660e6875d2544d059c |
|||
- OAUTH2_REDIRECT_URL=http://140.238.172.15:8080 |
|||
- WG_STATS_API=http://10.0.0.2:8182 |
|||
volumes: |
|||
- /etc/wireguard:/data |
|||
ports: |
|||
- 8080:8080 |
|||
wg-json-api: |
|||
image: james/wg-api:latest |
|||
container_name: wg-json-api |
|||
restart: unless-stopped |
|||
cap_add: |
|||
- NET_ADMIN |
|||
network_mode: "host" |
|||
command: wg-api --device wg0 --listen 0.0.0.0:8182 |
@ -1,9 +0,0 @@ |
|||
#!/bin/bash |
|||
|
|||
DATE=$(date +%Y%m%d_%H%M) |
|||
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" |
|||
PARENT_DIR="$(dirname "$SCRIPT_DIR")" |
|||
mkdir $PARENT_DIR/backup |
|||
rm -f $PARENT_DIR/backup/minios-live-current.tar.gz |
|||
tar -czf $PARENT_DIR/backup/minios-live-current.tar.gz --exclude .git --exclude "*.log" --exclude .script_version . |
|||
cp $PARENT_DIR/backup/minios-live-current.tar.gz $PARENT_DIR/backup/minios-live-$DATE.tar.gz |
Loading…
Reference in new issue