OSDN Git Service

[add] : customize_airootfs.sh
authorhayao <shun819.mail@gmail.com>
Fri, 18 Sep 2020 10:34:38 +0000 (19:34 +0900)
committerhayao <shun819.mail@gmail.com>
Fri, 18 Sep 2020 10:34:38 +0000 (19:34 +0900)
channels/serene/airootfs/root/customize_airootfs_serene.sh [new file with mode: 0644]
channels/share/airootfs/root/custmize_airootfs.sh [new file with mode: 0644]

diff --git a/channels/serene/airootfs/root/customize_airootfs_serene.sh b/channels/serene/airootfs/root/customize_airootfs_serene.sh
new file mode 100644 (file)
index 0000000..fdf967a
--- /dev/null
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+#
+# Yamada Hayao
+# Twitter: @Hayao0819
+# Email  : hayao@fascode.net
+#
+# (c) 2019-2020 Fascode Network.
+#
+
+set -e -u
+
+
+# Default value
+# Default value
+# All values can be changed by arguments.
+username="liveuser"
+
+
+# Parse arguments
+while getopts 'u:' arg; do
+    case "${arg}" in
+        u) username="${OPTARG}" ;;
+    esac
+done
+
+# Lightdm auto login
+sed -i "s/%USERNAME%/${username}" "/etc/lightdm.conf"
\ No newline at end of file
diff --git a/channels/share/airootfs/root/custmize_airootfs.sh b/channels/share/airootfs/root/custmize_airootfs.sh
new file mode 100644 (file)
index 0000000..406337f
--- /dev/null
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+#
+# Yamada Hayao
+# Twitter: @Hayao0819
+# Email  : hayao@fascode.net
+#
+# (c) 2019-2020 Fascode Network.
+#
+
+set -e -u
+
+
+# Default value
+# Default value
+# All values can be changed by arguments.
+username="liveuser"
+
+
+# Parse arguments
+while getopts 'u:' arg; do
+    case "${arg}" in
+        u) username="${OPTARG}" ;;
+    esac
+done
\ No newline at end of file