Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dadigang
Ventoy
Commits
37212a8e
Commit
37212a8e
authored
Apr 12, 2021
by
longpanda
Browse files
1. Fix a bug about source media missing when boot CentOS8
2. Support RED OS
parent
e71221cd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
8 deletions
+45
-8
IMG/cpio/ventoy/hook/rhel7/ventoy-hook.sh
IMG/cpio/ventoy/hook/rhel7/ventoy-hook.sh
+14
-0
IMG/cpio/ventoy/hook/rhel7/ventoy-inotifyd-hook.sh
IMG/cpio/ventoy/hook/rhel7/ventoy-inotifyd-hook.sh
+2
-8
IMG/cpio/ventoy/hook/rhel7/ventoy-repo.sh
IMG/cpio/ventoy/hook/rhel7/ventoy-repo.sh
+29
-0
No files found.
IMG/cpio/ventoy/hook/rhel7/ventoy-hook.sh
View file @
37212a8e
...
@@ -85,6 +85,20 @@ fi
...
@@ -85,6 +85,20 @@ fi
$BUSYBOX_PATH
/cp
-a
$VTOY_PATH
/hook/rhel7/ventoy-inotifyd-start.sh /lib/dracut/hooks/pre-udev/
${
vtPriority
}
-ventoy-inotifyd-start
.sh
$BUSYBOX_PATH
/cp
-a
$VTOY_PATH
/hook/rhel7/ventoy-inotifyd-start.sh /lib/dracut/hooks/pre-udev/
${
vtPriority
}
-ventoy-inotifyd-start
.sh
$BUSYBOX_PATH
/cp
-a
$VTOY_PATH
/hook/rhel7/ventoy-timeout.sh /lib/dracut/hooks/initqueue/timeout/
${
vtPriority
}
-ventoy-timeout
.sh
$BUSYBOX_PATH
/cp
-a
$VTOY_PATH
/hook/rhel7/ventoy-timeout.sh /lib/dracut/hooks/initqueue/timeout/
${
vtPriority
}
-ventoy-timeout
.sh
vtNeedRepo
=
if
[
-f
/etc/system-release
]
;
then
if
$GREP
-q
'RED OS'
/etc/system-release
]
;
then
vtNeedRepo
=
"yes"
fi
fi
if
$GREP
-q
el8 /proc/version
;
then
vtNeedRepo
=
"yes"
fi
if
[
"
$vtNeedRepo
"
=
"yes"
]
;
then
$BUSYBOX_PATH
/cp
-a
$VTOY_PATH
/hook/rhel7/ventoy-repo.sh /lib/dracut/hooks/pre-pivot/99-ventoy-repo.sh
fi
if
[
-e
/sbin/dmsquash-live-root
]
;
then
if
[
-e
/sbin/dmsquash-live-root
]
;
then
echo
"patch /sbin/dmsquash-live-root ..."
>>
$VTLOG
echo
"patch /sbin/dmsquash-live-root ..."
>>
$VTLOG
$SED
"1 a
$BUSYBOX_PATH
/sh
$VTOY_PATH
/hook/rhel7/ventoy-make-link.sh"
-i
/sbin/dmsquash-live-root
$SED
"1 a
$BUSYBOX_PATH
/sh
$VTOY_PATH
/hook/rhel7/ventoy-make-link.sh"
-i
/sbin/dmsquash-live-root
...
...
IMG/cpio/ventoy/hook/rhel7/ventoy-inotifyd-hook.sh
View file @
37212a8e
...
@@ -41,14 +41,8 @@ if is_inotify_ventoy_part $3; then
...
@@ -41,14 +41,8 @@ if is_inotify_ventoy_part $3; then
vtlog
"find ventoy partition ..."
vtlog
"find ventoy partition ..."
vtReplaceOpt
=
noreplace
vtReplaceOpt
=
noreplace
if
[
-f
/lib/dracut/hooks/pre-pivot/99-ventoy-repo.sh
]
;
then
if
$GREP
-q
el8 /proc/version
&&
[
-f
/etc/system-release
]
;
then
vtReplaceOpt
=
""
vtRhel8Ver
=
$(
$SED
"s#.*8
\.\(
[0-9]*
\)
.*#
\1
#"
/etc/system-release
)
if
[
$vtRhel8Ver
-ge
3
]
;
then
vtReplaceOpt
=
""
elif
$GREP
-q
"Stream"
/etc/system-release
;
then
vtReplaceOpt
=
""
fi
fi
fi
$BUSYBOX_PATH
/sh
$VTOY_PATH
/hook/default/udev_disk_hook.sh
$3
$vtReplaceOpt
$BUSYBOX_PATH
/sh
$VTOY_PATH
/hook/default/udev_disk_hook.sh
$3
$vtReplaceOpt
...
...
IMG/cpio/ventoy/hook/rhel7/ventoy-repo.sh
0 → 100644
View file @
37212a8e
#!/ventoy/busybox/sh
#************************************************************************************
# Copyright (c) 2020, longpanda <admin@ventoy.net>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
#************************************************************************************
.
/ventoy/hook/ventoy-hook-lib.sh
vtlog
"#####
$0
$*
..."
VTPATH_OLD
=
$PATH
;
PATH
=
$BUSYBOX_PATH
:
$VTOY_PATH
/tool:
$PATH
repodev
=
$(
ls
$VTOY_PATH
/dev_backup
*
)
echo
"inst.repo=hd:/dev/
${
repodev
#*dev_backup_
}
"
>>
/sysroot/etc/cmdline
PATH
=
$VTPATH_OLD
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment