summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV3n3RiX <venerix@rogentos.ro>2016-11-06 09:38:42 +0000
committerV3n3RiX <venerix@rogentos.ro>2016-11-06 09:38:42 +0000
commitde3dd54c2cff4bd3234977dcfe188fec5882e885 (patch)
treedcf9ec665b84bde62cf7453f7b6a018735f51187
parentfa4389f9cd15baea4bd882bd192e7333aee39a79 (diff)
adjust paths
-rw-r--r--Makefile4
-rw-r--r--redcorelive.service (renamed from kogaionlive.service)2
-rwxr-xr-xredcorelive.sh (renamed from kogaionlive.sh)26
3 files changed, 16 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index dec3f65..71e859f 100644
--- a/Makefile
+++ b/Makefile
@@ -19,6 +19,6 @@ install:
for d in $(SUBDIRS); do $(MAKE) -C $$d install; done
install -d $(DESTDIR)/$(LIBEXECDIR)
- install -m 0755 kogaionlive.sh $(DESTDIR)/$(LIBEXECDIR)/
+ install -m 0755 redcorelive.sh $(DESTDIR)/$(LIBEXECDIR)/
install -d $(DESTDIR)/$(SYSTEMD_UNITDIR)/
- install -m 0644 kogaionlive.service $(DESTDIR)/$(SYSTEMD_UNITDIR)/
+ install -m 0644 redcorelive.service $(DESTDIR)/$(SYSTEMD_UNITDIR)/
diff --git a/kogaionlive.service b/redcorelive.service
index 268b43c..2881da5 100644
--- a/kogaionlive.service
+++ b/redcorelive.service
@@ -5,7 +5,7 @@ Before=display-manager.service getty.target
[Service]
Type=oneshot
RemainAfterExit=true
-ExecStart=/usr/libexec/kogaionlive.sh
+ExecStart=/usr/libexec/redcorelive.sh
[Install]
WantedBy=multi-user.target
diff --git a/kogaionlive.sh b/redcorelive.sh
index fc90fb8..696aa48 100755
--- a/kogaionlive.sh
+++ b/redcorelive.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-export local liveuser="kogaion"
+export local liveuser="redcore"
checkroot() {
if [[ "$(whoami)" != root ]] ; then
@@ -9,28 +9,28 @@ checkroot() {
fi
}
-kogaion_is_live() {
+redcore_is_live() {
if [[ ! -L "/dev/mapper/live-rw" ]] ; then
echo "The system is not running in live mode, aborting!"
exit 1
fi
}
-kogaion_add_live_user() {
+redcore_add_live_user() {
/usr/sbin/useradd -u 1000 -g 100 -o -m -s /bin/bash "$liveuser" > /dev/null 2>&1
}
-kogaion_live_user_groups() {
+redcore_live_user_groups() {
for group in tty disk lp wheel uucp console audio cdrom tape video cdrw usb plugdev messagebus portage vboxsf vboxguest ; do
gpasswd -a "$liveuser" "$group" > /dev/null 2>&1
done
}
-kogaion_live_user_password() {
+redcore_live_user_password() {
echo "$liveuser":"$liveuser" | /usr/sbin/chpasswd > /dev/null 2>&1
}
-kogaion_live_locale_switch() {
+redcore_live_locale_switch() {
export local keymap_toset="$(cat /proc/cmdline | cut -d " " -f5 | cut -d "=" -f2)"
export local lang_toset="$(cat /proc/cmdline | cut -d " " -f6 | cut -d "=" -f2)"
if [[ "$lang_toset" != "en_US.utf8" ]] || [[ "$keymap_toset" != "us" ]] ; then
@@ -40,19 +40,19 @@ kogaion_live_locale_switch() {
fi
}
-kogaion_live_installer_desktop() {
+redcore_live_installer_desktop() {
cp "/usr/share/applications/calamares.desktop" "/home/"$liveuser"/Desktop"
sed -i "s/"Name=Calamares"/"Name=Kogaion\ Installer"/g" "/home/"$liveuser"/Desktop/calamares.desktop"
chmod 755 "/home/"$liveuser"/Desktop/calamares.desktop"
}
main() {
- if checkroot && kogaion_is_live ; then
- kogaion_add_live_user
- kogaion_live_user_groups
- kogaion_live_user_password
- kogaion_live_installer_desktop
- kogaion_live_locale_switch
+ if checkroot && redcore_is_live ; then
+ redcore_add_live_user
+ redcore_live_user_groups
+ redcore_live_user_password
+ redcore_live_installer_desktop
+ redcore_live_locale_switch
fi
}