Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lipstick
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
osak
lipstick
Commits
fb2a9689
Commit
fb2a9689
authored
Nov 7, 2020
by
Valentin Bruch
Browse files
Options
Downloads
Patches
Plain Diff
linuxparty.sh: bug fixes; new post-oem-lip copies linuparty.sh to Desktop
parent
865884b4
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
build-image.md
+4
-1
4 additions, 1 deletion
build-image.md
linuxparty.sh
+9
-3
9 additions, 3 deletions
linuxparty.sh
post-oem-lip
+31
-0
31 additions, 0 deletions
post-oem-lip
with
44 additions
and
4 deletions
build-image.md
+
4
−
1
View file @
fb2a9689
...
...
@@ -23,6 +23,7 @@ reboot
# remove old kernel versions (here for version 26):
sudo apt purge linux-headers-5.4.0-26 linux-headers-5.4.0-26-generic linux-image-5.4.0-26-generic linux-modules-5.4.0-26-generic linux-modules-extra-5.4.0-26-generic
sudo apt clean
sudo journalctl --vacuum-size 1M
# preinstalled packages
sudo apt install git vim htop virtualbox-guest-x11
# clear swap (optional)
...
...
@@ -57,9 +58,11 @@ sudo mount /dev/nbd1p5 mnt1
sudo cp -a mnt0/* mnt1
sync
# Copy LIP script
mkdir mnt1/opt/lip
sudo
mkdir mnt1/opt/lip
sudo cp linuxparty.sh packages mnt1/opt/lip
sudo chmod 755 mnt1/opt/lip/linuxparty.sh
sudo cp post-oem-lip mnt1/usr/lib/oem-config/post-install
sudo chmod 755 mnt1/usr/lib/oem-config/post-install
sudo umount mnt0 mnt1
# Delete network block devices
sudo qemu-nbd -d /dev/nbd0
...
...
This diff is collapsed.
Click to expand it.
linuxparty.sh
+
9
−
3
View file @
fb2a9689
#!/bin/bash
# !! Angepasste Version zur Benutzung in einer VM !!
# Install useful packages in a newly installed (or imported) VM.
# This script requires a file "packages" in the same directory, which should
# contain a list of packages with each line of the format
# flags|package name(s)|description
set
-e
# Root sicherstellen
if
[[
"
$EUID
"
-ne
0
]]
then
for
GUISU
in
gksu kdesu p
g
exec
''
;
do
for
GUISU
in
gksu kdesu p
k
exec
''
;
do
command
-v
"
$GUISU
"
2>&1
>
/dev/null
&&
break
done
if
[
-n
"
$DISPLAY
"
]
&&
[
-n
"
$GUISU
"
]
;
then
$GUISU
"
$(
realpath
"
$0
"
)
"
$GUISU
env
DISPLAY
=
"
$DISPLAY
"
XAUTHORITY
=
"
$XAUTHORITY
"
"
$(
realpath
"
$0
"
)
"
exit
"
$?
"
else
echo
"Du bist nicht ROOT ... verwende
\"
sudo bash
$0
\"
!"
...
...
@@ -17,7 +24,6 @@ then
fi
fi
#options for GUI are kdialog zenity none
if
[
-z
"
$GUI
"
]
;
then
echo
"
\$
GUI is not set. Auto detecting GUI..."
...
...
This diff is collapsed.
Click to expand it.
post-oem-lip
0 → 100644
+
31
−
0
View file @
fb2a9689
#!/bin/bash
# This script copies linuxparty.sh and packages from $BASEDIR to $HOME (of
# every user). $BASEDIR and its files will be deleted if files were copied
# successfully. This script should be run immediately after oem-config.
# Put this file in /usr/lib/oem-config/post-install/ and make it executable.
# The file name of this script may not contain a dot, because ... ubiquity is
# very strange. Put linuxparty.sh and packages list in /opt/lip/linuxparty.sh
# and make linuxparty.sh executable.
set
-e
BASEDIR
=
'/opt/lip'
DELETE
=
for
user
in
$(
ls
/home
)
;
do
mkdir
-p
"/home/
$user
/Desktop"
cp
"
$BASEDIR
/linuxparty.sh"
"
$BASEDIR
/packages"
"/home/
$user
/Desktop/"
||
continue
chown
-R
"
$user
:
$user
"
"/home/
$user
/Desktop"
DELETE
=
1
done
if
[
-n
"
$DELETE
"
]
;
then
rm
"
$BASEDIR
/linuxparty.sh"
"
$BASEDIR
/packages"
rmdir
"
$BASEDIR
"
fi
rm
-d
"
$0
"
rmdir
/usr/lib/oem-config/post-install
rmdir
/usr/lib/oem-config
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