OSDN Git Service

add postinstall
authorpaperbenni <paperbenni@gmail.com>
Mon, 11 May 2020 17:49:24 +0000 (19:49 +0200)
committerpaperbenni <paperbenni@gmail.com>
Mon, 11 May 2020 17:49:24 +0000 (19:49 +0200)
autostart.sh
install.sh
programs/dunsttrigger
programs/instantpostinstall [new file with mode: 0644]
programs/instantupdate
programs/instantwine
rootinstall.sh
userinstall.sh

index 36b06e5..d4f5860 100755 (executable)
@@ -118,8 +118,18 @@ onlinetrigger() {
 
 # set up oh-my-zsh config if not existing already
 instantshell &
+if ! [ iconf -i userinstall ]; then
+       bash /usr/share/instantutils/userinstall.sh
+fi
 
 if [ -z "$ISLIVE" ]; then
+
+       if [ -e /opt/instantos/installtrigger ]; then
+               zenity --info --text "finishing installation in background" &
+               sudo instantpostinstall
+               pkill zenity
+       fi
+
        cd ~/instantos
        if ! iconf -i max; then
                instantmonitor
@@ -131,13 +141,13 @@ if [ -z "$ISLIVE" ]; then
                autorandr instantos &
        fi
 
-       if ping google.com -c 2; then
+       if ping archlinux.org -c 2; then
                onlinetrigger
        else
                # fall back to already installed wallpapers
                instantwallpaper offline
                for i in $(seq 10); do
-                       if ping google.com -c 2; then
+                       if ping archlinux.org -c 2; then
                                onlinetrigger
                                break
                        else
index b63f5e0..748cfaf 100755 (executable)
@@ -35,11 +35,6 @@ echo "installing dependencies"
 
 echo "root: installing tools"
 /usr/share/instantutils/rootinstall.sh
-/usr/share/instantdotfiles/rootinstall.sh
 
-userrun /usr/share/instantutils/userinstall.sh
 
 instantthemes f
-
-echo "installing dotfiles"
-instantdotfiles -f root
index 21e5f51..34f8926 100755 (executable)
@@ -10,7 +10,7 @@ fi
 # some apps dont need/already have notification sounds
 if ! echo "$1" | grep -Eiq '(discord|spotify|thunderbird|mailspring)'; then
     if ! [ -e ~/instantos/notifications/notification.ogg ]; then
-        if ping -c 1 google.com; then
+        if ping -c 1 archlinux.org; then
             mkdir -p ~/instantos/notifications/
             wget -qO ~/instantos/notifications/notification.ogg \
                 "https://notificationsounds.com/notification-sounds/me-too-603/download/ogg"
diff --git a/programs/instantpostinstall b/programs/instantpostinstall
new file mode 100644 (file)
index 0000000..16b3a47
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+echo "finishing up installation"
+bash /root/instantARCH/postinstall.sh
+bash /usr/share/instantdotfiles/rootinstall.sh
+
+# require password for root account
+sed -i '/.*#instantosroot/d' /etc/sudoers
+rm /opt/instantos/installtrigger
index 6124cd6..1fd1675 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-if ! ping -c 1 google.com &>/dev/null; then
+if ! ping -c 1 archlinux.org &>/dev/null; then
     echo "internet is required to upgrade instantOS"
     exit 1
 fi
index 8c065bc..795ad7c 100755 (executable)
@@ -7,7 +7,7 @@ else
     exit
 fi
 
-if ! ping -c 1 google.com; then
+if ! ping -c 1 archlinux.org; then
     echo "internet is required"
     exit
 fi
index cd06202..74aa0e3 100755 (executable)
@@ -134,3 +134,10 @@ fi
 
 # fix brightness permissions
 bash /opt/instantos/menus/data/backlight.sh
+
+# set up postinstall trigger
+echo "root ALL=(ALL) NOPASSWD:ALL #instantosroot" >>/etc/sudoers
+echo "" >>/etc/sudoers
+
+mkdir -p /opt/instantos
+touch /opt/instantos/installtrigger
index 116451f..41b3579 100755 (executable)
@@ -8,7 +8,7 @@ cd
 echo "installing instantOS tools"
 
 # laptop specific stuff
-if acpi | grep -q '.' &> /dev/null; then
+if acpi | grep -q '.' &>/dev/null; then
     # config file to indicate being a laptop
     echo "device appears to be a laptop"
     iconf -i islaptop 1
@@ -27,4 +27,7 @@ if lsusb | grep -iq 'bluetooth'; then
     iconf -i hasbluetooth 1
 fi
 
-instantmouse gen
\ No newline at end of file
+instantmouse gen
+
+mkdir ~/instantos
+iconf -i userinstall 1