Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mkimage-profiles
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Anton Palgunov
mkimage-profiles
Commits
2b718f56
Commit
2b718f56
authored
Feb 04, 2024
by
Anton Midyukov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
live: refactoring 60-live-rescue-root
parent
8856c552
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
18 deletions
+9
-18
60-live-rescue-root
features.in/live/live/image-scripts.d/60-live-rescue-root
+9
-18
No files found.
features.in/live/live/image-scripts.d/60-live-rescue-root
View file @
2b718f56
...
...
@@ -5,17 +5,18 @@
[
-x
/usr/sbin/live-install
]
||
\
[
-x
/usr/sbin/livecd-install
]
&&
exit
0
[
-x
/sbin/rescue-launcher
]
||
[
-x
/usr/bin/rescue-shell-show
]
||
exit
0
which rescue-shell-show
>
/dev/null 2>&1
||
exit
0
# for systemd only
rpm
-q
systemd-sysvinit
>
/dev/null 2>&1
||
exit
0
ls
-l
/sbin/init |grep
-q
systemd
||
exit
0
# disable issue "Hello friend, say '$LIVECD_LOGIN' to log in at"
[
!
-f
/etc/sysconfig/livecd-user.conf
]
||
echo
'LIVECD_NO_ISSUE=1'
>>
/etc/sysconfig/livecd-user.conf
# Autologin root to tty's
mkdir
-p
/etc/systemd/system/getty@.service.d
cat
>>
/etc/systemd/system/getty@.service.d/
overrid
e.conf
<<
'
EOF
'
cat
>>
/etc/systemd/system/getty@.service.d/
live-rescu
e.conf
<<
'
EOF
'
[Service]
Type=simple
ExecStart=
...
...
@@ -37,24 +38,14 @@ AllowIsolate=yes
EOF
cat
>>
/root/.bash_profile
<<
'
EOF
'
if grep -qsv 'init=' /proc/cmdline; then
EOF
[
-x
/sbin/rescue-launcher
]
&&
cat
>>
/root/.bash_profile
<<
'
EOF
'
if grep -qs 'systemd.unit=live-rescue.target' /proc/cmdline; then
if grep -wqs autorun /proc/cmdline; then
if
[ -x /sbin/rescue-launcher ]
; then
if
which rescue-launcher >/dev/null 2>&1
; then
if [ "
$(
tty
2>/dev/null
)
" = "/dev/tty1" ]; then
/sbin/
rescue-launcher "
$@
"
rescue-launcher "
$@
"
fi
fi
fi
which rescue-shell-show >/dev/null 2>&1 && rescue-shell-show
fi
EOF
[
-x
/usr/bin/rescue-shell-show
]
&&
cat
>>
/root/.bash_profile
<<
'
EOF
'
rescue-shell-show
EOF
echo
"fi"
>>
/root/.bash_profile
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