Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
system.linux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Simple Deploy- and Management
system.linux
Commits
70ea3b10
Commit
70ea3b10
authored
5 years ago
by
Pietsch, Martin
Browse files
Options
Downloads
Patches
Plain Diff
move content of bootlocal.sh to profile
parent
2c004c9e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
files/bootlocal.sh
+1
-57
1 addition, 57 deletions
files/bootlocal.sh
files/profile
+34
-1
34 additions, 1 deletion
files/profile
with
35 additions
and
58 deletions
files/bootlocal.sh
+
1
−
57
View file @
70ea3b10
#!/bin/sh
cd
/opt
# include functions.sh
.
./functions.sh
# wait for Network
# wait max 100 seconds until something is in /etc/resolv.conf
while
!
test
-s
/etc/resolv.conf
do
[
"
$counter
"
-ge
100
]
&&
exit
1
let
"counter+=1"
echo
"waiting "
$counter
"seconds for network :-)"
sleep
1
done
# chmod / or tc user can not login, so no tce-load would be possible
chmod
755 /
# install packages required by diskpreperation.sh
installTcPackages bash parted bc ntfs-3g dosfstools
# workaround for limited availability of btrfs-progs and reiserfsprogs
architecture
=
$(
uname
-m
)
if
[
"
${
architecture
}
"
==
"x86_64"
]
then
installTcPackages btrfs-progs
else
installTcPackages reiserfsprogs
fi
# install and set keyboard layout for debugging
installTcPackages kmaps util-linux
loadkmap </usr/share/kmap/qwertz/de-latin1-nodeadkeys.kmap
echo
"create target directory"
mkdir
/target
chmod
0755 /target
# run install.sh
echo
"switch to bash and run installer"
bash ./installer.sh |
tee
>>
/tmp/installer.logfile
mkdir
-p
/target/etc/ssh/
chmod
0755 /target/etc/ssh/
chown
0:0 /target/etc/ssh/
cp
/opt/ansible.pub /target/etc/ssh/authorized_keys
chmod
0644 /target/etc/ssh/authorized_keys
chown
0:0 /target/etc/ssh/authorized_keys
cp
/tmp/fstab.target /target/etc/fstab
chmod
0644 /target/etc/fstab
chown
0:0 /target/etc/fstab
sync
echo
"installer finished, logfile: /tmp/installer.logfile"
echo
"export ANSWERFILE_PATH=
${
ANSWERFILE_PATH
}
"
>
/etc/profile.d/answerfile.sh
This diff is collapsed.
Click to expand it.
files/profile
+
34
−
1
View file @
70ea3b10
#!/bin/sh
/bin/sh
.
/opt/functions.sh
chmod
755 /
netwaitcnt
=
0
beginLogEntry
"waiting for network"
while
[
!
-s
/etc/resolv.conf
]
;
do
[
"
${
netwaitcnt
}
"
-ge
100
]
&&
finishLogEntry
"failed"
&&
exit
1
netwaitcnt
=
$((${
netwaitcnt
}
+
1
))
echo
-n
"."
sleep
1
done
finishLogEntry
"done"
beginLogEntry
"install default dependencies"
installTcPackages bash parted bc ntfs-3g dosfstools openssl
architecture
=
$(
uname
-m
)
case
${
architecture
}
in
x86_64
)
installTcPackages btrfs-progs
;;
i[0-9]86
)
installTcPackages reiserfsprogs
;;
esac
finishLogEntry
"done"
beginLogEntry
"get Answerfile from
\"
${
ANSWERFILE_PATH
}
\"
"
getAnswerfile
${
ANSWERFILE_PATH
}
/tmp/answerfile
if
[
$?
-eq
0
]
;
then
finishLogEntry
"done"
/opt/installer.sh
else
finishLogEntry
"failed"
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment