summaryrefslogtreecommitdiffstats
path: root/abs/core/mythsmolt/smolt_init_login.sh
diff options
context:
space:
mode:
authorMichael Hanson <hansonorders@verizon.net>2010-11-30 01:54:15 (GMT)
committerMichael Hanson <hansonorders@verizon.net>2010-11-30 01:54:15 (GMT)
commit00c32bd504e5d2a5a40ce0d204d2e4d2eff31014 (patch)
treea9e066a00e64119e2d17ae188da902334b5310ec /abs/core/mythsmolt/smolt_init_login.sh
parentd590657014e9074017b9cbe854e488f7845824fe (diff)
parentf51ae172e5e8580b88b479ebc0574c4c4c55e677 (diff)
downloadlinhes_pkgbuild-00c32bd504e5d2a5a40ce0d204d2e4d2eff31014.zip
linhes_pkgbuild-00c32bd504e5d2a5a40ce0d204d2e4d2eff31014.tar.gz
linhes_pkgbuild-00c32bd504e5d2a5a40ce0d204d2e4d2eff31014.tar.bz2
Merge branch 'testing' of knoppmyth.net:linhes_pkgbuild into testing
Diffstat (limited to 'abs/core/mythsmolt/smolt_init_login.sh')
-rw-r--r--abs/core/mythsmolt/smolt_init_login.sh39
1 files changed, 39 insertions, 0 deletions
diff --git a/abs/core/mythsmolt/smolt_init_login.sh b/abs/core/mythsmolt/smolt_init_login.sh
new file mode 100644
index 0000000..0b76305
--- /dev/null
+++ b/abs/core/mythsmolt/smolt_init_login.sh
@@ -0,0 +1,39 @@
+if [ $UID = 0 -o $UID = 1000 ]
+then
+ INIT=`ps -p 1 -o comm=`
+ if [ x$INIT = xrunit ]
+ then
+ if [[ -f /home/mythtv/.configure && $- = *i* ]]
+ then
+ if [ ! -z "$PS1" ]
+ then
+ if [ $0 = "-bash" ]
+ then
+ if [ ! -e /home/mythtv/.mythtv/MythSmolt/hw-uuid ]
+ then
+ echo ""
+ echo "####################################################"
+ echo "It appears you have not yet run smolt"
+ echo "Please take the time to submit your hardware profile"
+ echo ""
+ echo "press any key to continue:"
+ echo "####################################################"
+ read a
+ mkdir -p /home/mythtv/.mythtv/MythSmolt
+ chown -R mythtv:users /home/mythtv/.mythtv/MythSmolt
+
+ if [ $UID = 0 ]
+ then
+ su mythtv -c "/usr/share/mythtv/mythsmolt/scripts/sendProfile.py" && su mythtv -c "touch /home/mythtv/.mythtv/MythSmolt/hw-uuid"
+ else
+ /usr/share/mythtv/mythsmolt/scripts/sendProfile.py && touch /home/mythtv/.mythtv/MythSmolt/hw-uuid
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+fi
+
+
+