From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arne Fitzenreiter To: ipfire-scm@lists.ipfire.org Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. b69f054b8d357f1e4cad00c33206e0288aaf9a2d Date: Sun, 16 Jan 2022 15:25:16 +0000 Message-ID: <4JcJkh2rkCz2xS0@people01.haj.ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0360352371611662244==" List-Id: --===============0360352371611662244== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree". The branch, next has been updated via b69f054b8d357f1e4cad00c33206e0288aaf9a2d (commit) via 68a50dd12df884743ac2f885d4d36a7b99126e99 (commit) from 14aa983025562b72ee62a1c7515b25c680658516 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b69f054b8d357f1e4cad00c33206e0288aaf9a2d Author: Arne Fitzenreiter Date: Sun Jan 16 15:24:28 2022 +0000 core163: add cake changes to updater =20 Signed-off-by: Arne Fitzenreiter commit 68a50dd12df884743ac2f885d4d36a7b99126e99 Author: Arne Fitzenreiter Date: Sun Jan 16 13:46:36 2022 +0000 installer: add partitions as installation source =20 This add compatiblity for rufus usb-keys that convert the iso to fat or ntfs partition. =20 Signed-off-by: Arne Fitzenreiter ----------------------------------------------------------------------- Summary of changes: config/rootfiles/core/163/filelists/files | 5 +++++ config/rootfiles/core/163/update.sh | 9 +++++++-- src/installer/dracut-module/module-setup.sh | 2 +- src/installer/hw.c | 27 +++++++++++++++++++++++++-- src/installer/main.c | 8 ++++++-- 5 files changed, 44 insertions(+), 7 deletions(-) Difference in files: diff --git a/config/rootfiles/core/163/filelists/files b/config/rootfiles/cor= e/163/filelists/files index d8baf418f..c3d53e9d2 100644 --- a/config/rootfiles/core/163/filelists/files +++ b/config/rootfiles/core/163/filelists/files @@ -1,6 +1,11 @@ etc/dracut.conf +lib/udev/network-aqm +lib/udev/network-hotplug-bridges +lib/udev/rules.d/99-aqm.rules +srv/web/ipfire/cgi-bin/qos.cgi srv/web/ipfire/cgi-bin/ovpnmain.cgi srv/web/ipfire/cgi-bin/vpnmain.cgi srv/web/ipfire/html/themes/ipfire/include/functions.pl var/ipfire/backup/bin/backup.pl var/ipfire/dhcp/advoptions-list +var/ipfire/qos/bin/makeqosscripts.pl diff --git a/config/rootfiles/core/163/update.sh b/config/rootfiles/core/163/= update.sh index f0bc7fb55..5b35ed4df 100644 --- a/config/rootfiles/core/163/update.sh +++ b/config/rootfiles/core/163/update.sh @@ -17,7 +17,7 @@ # along with IPFire; if not, write to the Free Software # # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # # -# Copyright (C) 2021 IPFire-Team . = # +# Copyright (C) 2022 IPFire-Team . = # # # ############################################################################ # @@ -56,9 +56,12 @@ rm -vrf \ /lib/firmware/cxgb4/t4fw-1.25.4.0.bin \ /lib/firmware/cxgb4/t5fw-1.25.4.0.bin \ /lib/firmware/cxgb4/t6fw-1.25.4.0.bin \ - /lib/firmware/intel/ice/ddp/ice-1.3.16.0.pkg + /lib/firmware/intel/ice/ddp/ice-1.3.16.0.pkg \ + /lib/udev/enable_codel \ + /lib/udev/rules.d/99-codel.rules =20 # Stop services +/usr/local/bin/qosctrl stop =20 # Extract files extract_files @@ -77,6 +80,8 @@ telinit u /etc/init.d/apache restart /etc/init.d/unbound restart /etc/init.d/squid restart +/usr/local/bin/qosctrl generate +/usr/local/bin/qosctrl start =20 # rebuild initrd dracut --force --early-microcode --strip --verbose --xz diff --git a/src/installer/dracut-module/module-setup.sh b/src/installer/drac= ut-module/module-setup.sh index 5550ec763..c68b51d26 100755 --- a/src/installer/dracut-module/module-setup.sh +++ b/src/installer/dracut-module/module-setup.sh @@ -31,7 +31,7 @@ install() { =20 # Filesystem support inst_multiple parted mkswap mke2fs mkreiserfs mkfs.xfs mkfs.vfat - instmods ext4 iso9660 reiserfs vfat xfs + instmods ext4 iso9660 reiserfs vfat xfs ntfs3 =20 # Extraction inst_multiple tar gzip zstd diff --git a/src/installer/hw.c b/src/installer/hw.c index b532bb16e..17e0bbb01 100644 --- a/src/installer/hw.c +++ b/src/installer/hw.c @@ -202,6 +202,15 @@ int hw_umount(const char* source, const char* prefix) { static int hw_test_source_medium(const char* path) { int ret =3D hw_mount(path, SOURCE_MOUNT_PATH, "iso9660", MS_RDONLY); =20 + if (ret !=3D 0) { + // 2nd try, ntfs for a rufus converted usb key + ret =3D hw_mount(path, SOURCE_MOUNT_PATH, "ntfs3", MS_RDONLY); + } + if (ret !=3D 0) { + // 3rd try, vfat for a rufus converted usb key + ret =3D hw_mount(path, SOURCE_MOUNT_PATH, "vfat", MS_RDONLY); + } + // If the source could not be mounted we // cannot proceed. if (ret !=3D 0) @@ -275,6 +284,20 @@ struct hw_disk** hw_find_disks(struct hw* hw, const char= * sourcedrive) { struct hw_disk** ret =3D hw_create_disks(); struct hw_disk** disks =3D ret; =20 + // Determine the disk device of source if it is a partition + char* sourcedisk =3D NULL; + char syssource[PATH_MAX]; + (void)snprintf(syssource, sizeof(syssource) - 1, "/sys/class/block/%s", sou= rcedrive + 5); + struct udev_device* s_dev =3D udev_device_new_from_syspath(hw->udev, syssou= rce); + const char* s_devtype =3D udev_device_get_property_value(s_dev, "DEVTYPE"); + if (s_devtype && (strcmp(s_devtype, "partition") =3D=3D 0)) { + struct udev_device* p_dev =3D udev_device_get_parent_with_subsystem_devtyp= e(s_dev,"block","disk"); + if (p_dev) { + sourcedisk =3D udev_device_get_devnode(p_dev); + } + } + if (!sourcedisk) sourcedisk =3D sourcedrive; + struct udev_enumerate* enumerate =3D udev_enumerate_new(hw->udev); =20 udev_enumerate_add_match_subsystem(enumerate, "block"); @@ -298,8 +321,8 @@ struct hw_disk** hw_find_disks(struct hw* hw, const char*= sourcedrive) { continue; } =20 - // Skip sourcedrive if we need to - if (sourcedrive && (strcmp(dev_path, sourcedrive) =3D=3D 0)) { + // Skip sourcedisk if we need to + if (sourcedisk && (strcmp(dev_path, sourcedisk) =3D=3D 0)) { udev_device_unref(dev); continue; } diff --git a/src/installer/main.c b/src/installer/main.c index fabc0ef52..b31b096a5 100644 --- a/src/installer/main.c +++ b/src/installer/main.c @@ -415,7 +415,8 @@ int main(int argc, char *argv[]) { } =20 // Load common modules - mysystem(logfile, "/sbin/modprobe vfat"); // USB key + mysystem(logfile, "/sbin/modprobe vfat"); // USB key + mysystem(logfile, "/sbin/modprobe ntfs3"); // USB key hw_stop_all_raid_arrays(logfile); =20 if (!config.unattended) { @@ -555,7 +556,10 @@ int main(int argc, char *argv[]) { assert(sourcedrive); =20 int r =3D hw_mount(sourcedrive, SOURCE_MOUNT_PATH, "iso9660", MS_RDONLY); - if (r) { + if (r) r =3D hw_mount(sourcedrive, SOURCE_MOUNT_PATH, "ntfs3", MS_RDONLY); + if (r) r =3D hw_mount(sourcedrive, SOURCE_MOUNT_PATH, "vfat", MS_RDONLY); + if (r) + { snprintf(message, sizeof(message), _("Could not mount %s to %s:\n %s\n"), sourcedrive, SOURCE_MOUNT_PATH, strerror(errno)); errorbox(message); hooks/post-receive -- IPFire 2.x development tree --===============0360352371611662244==--